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.
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
connectionIdidRequiredFrom
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
connectionIdidRequiredFrom
list_exchange_connections.symboltext (2–40 characters)RequiredA market as the exchange names it, like
BTC-PERP,HYPE-SPOTorxyz:AAPL-PERP.sideone ofbuy,sellRequiredtypeone ofmarket,limitRequiredsizenumber (above 0)Requiredpricenumber (above 0)reduceOnlytrueorfalseconfirmtrueorfalseLeave 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
trueonce you have said yes. Defaultfalse.
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
connectionIdidRequiredFrom
list_exchange_connections.symboltext (2–40 characters)RequiredA market as the exchange names it, like
BTC-PERP,HYPE-SPOTorxyz:AAPL-PERP.orderIdtext (not empty, up to 100 characters)RequiredconfirmtrueorfalseLeave 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
trueonce you have said yes. Defaultfalse.
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
connectionIdidRequiredFrom
list_exchange_connections.symboltext (2–40 characters)RequiredA market as the exchange names it, like
BTC-PERP,HYPE-SPOTorxyz:AAPL-PERP.confirmtrueorfalseLeave 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
trueonce you have said yes. Defaultfalse.
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.