Docs menu

Account & trading

What is in your account, and the three tools that trade. Each trading tool works only if you let the AI app place orders, and tells you what it will do before it does it.

Updated

list_exchange_connections

Lists your exchange connections and whether each is the test network or real.

  • Reads only

Inputs

Takes no inputs.

What the AI app reads

List the user's exchange connections (id, exchange, testnet or real). The trading tools need a connectionId from here.

get_account

Balance, open positions and open orders on one connection.

  • Reads only

Inputs

  • connectionIdidRequired

    From list_exchange_connections.

What the AI app reads

Balance, open positions and open orders for one exchange connection.

place_order

Places a market or limit order. Real money on a real connection.

  • Only with May place orders on
  • Two steps: tells you first

Inputs

  • connectionIdidRequired

    From list_exchange_connections.

  • symboltext (2–40 characters)Required

    A market as the exchange names it, like BTC-PERP, HYPE-SPOT or xyz:AAPL-PERP.

  • sideone of buy, sellRequired
  • typeone of market, limitRequired
  • sizenumber (above 0)Required
  • pricenumber (above 0)
  • reduceOnlytrue or false
  • confirmtrue or false

    Leave out the first time: the tool does nothing and asks the AI app to tell you exactly what it is about to do. It calls again with true once you have said yes. Default false.

What the AI app reads

Place an order on the exchange (real money on a real connection). This is a real trading action. Tell the user exactly what you are about to do, then call again with confirm: true.

cancel_order

Cancels one open order.

  • Only with May place orders on
  • Two steps: tells you first

Inputs

  • connectionIdidRequired

    From list_exchange_connections.

  • symboltext (2–40 characters)Required

    A market as the exchange names it, like BTC-PERP, HYPE-SPOT or xyz:AAPL-PERP.

  • orderIdtext (not empty, up to 100 characters)Required
  • confirmtrue or false

    Leave out the first time: the tool does nothing and asks the AI app to tell you exactly what it is about to do. It calls again with true once you have said yes. Default false.

What the AI app reads

Cancel an open order by id. This is a real trading action. Tell the user exactly what you are about to do, then call again with confirm: true.

close_position

Closes an open position at market.

  • Only with May place orders on
  • Two steps: tells you first

Inputs

  • connectionIdidRequired

    From list_exchange_connections.

  • symboltext (2–40 characters)Required

    A market as the exchange names it, like BTC-PERP, HYPE-SPOT or xyz:AAPL-PERP.

  • confirmtrue or false

    Leave out the first time: the tool does nothing and asks the AI app to tell you exactly what it is about to do. It calls again with true once you have said yes. Default false.

What the AI app reads

Close an open position at market. This is a real trading action. Tell the user exactly what you are about to do, then call again with confirm: true.

↑↓ to move↵ to openEsc to closeAll help