trade API ver. 1.0
Base URL https://api.takepair.com/trading/v1. Send the key as Authorization: Bearer tp_bot_…. Settings shows the secret once. The trade right places and cancels orders. The withdraw right sends only to addresses saved in settings. The limit is 600 requests per minute. Money is a decimal string plus USDC or USDT. Replaying the same idempotency key does not place a second order.
Do not put the key in a browser, a public page, or a mobile app.
Both sides
A maker order rests on the book with an outcome, a stake, and odds. One call can place both outcomes. A taker takes another order in full or in part. Before closes_at, cancelling returns the unmatched stake in full. The matched part stays. After closes_at the platform cancels the unmatched stake and charges the cutoff fee. If the bot goes silent after a heartbeat, trade API ver. 1.0 cancels that key's unmatched orders while bets are still open.
Read markets
curl "https://api.takepair.com/trading/v1/markets" \ -H "Authorization: Bearer tp_bot_…"
Place both outcomes
curl -X POST https://api.takepair.com/trading/v1/orders/batch \
-H "Authorization: Bearer tp_bot_…" \
-H "Content-Type: application/json" \
-d '{"orders":[{"event_id":"…","outcome_id":"…","side":"YES","currency":"USDC","stake_amount":"10","odds":"1.90","idempotency_key":"up-1"},{"event_id":"…","outcome_id":"…","side":"YES","currency":"USDC","stake_amount":"10","odds":"1.90","idempotency_key":"down-1"}]}'Methods
| GET /time | Server clock |
| GET /markets | Markets open for bets, and markets just closed for bets, with the winning-side fee and cutoff rules |
| GET /markets/{event_id} | One market |
| GET /markets/{event_id}/book | Resting orders, including other players, without their account ids |
| GET /markets/{event_id}/position | Matched and resting size on each outcome, and the worst matched loss |
| GET /markets/{event_id}/resolution | Oracle prices, winner, winning-side fee, and payout on your matches |
| POST /orders | Rest an order: outcome, stake, odds |
| POST /orders/batch | Both outcomes in one call. Each order has its own idempotency key |
| POST /orders/{order_id}/take | Take another order in full or in part |
| GET /orders | Your orders. open=true is the snapshot after a dropped stream |
| GET /orders/{order_id} | One of your orders and its status |
| DELETE /orders/{order_id} | Cancel your unmatched remainder before closes_at. The stake returns in full |
| DELETE /orders | Cancel unmatched bot orders on one market or on all markets |
| GET /fills | Your recent matches |
| POST /heartbeat | If the bot goes silent, unmatched orders of this key are cancelled while bets are open |
| GET /stream/book | Market open, book, bet cutoff, and resolution. No account ids |
| GET /stream/account | Your fills and cancels, plus market life |
| GET /balances | Available and locked USDC and USDT |
| GET /deposit-addresses | Deposit address and network. The bot sends the coins |
| GET /deposits | Credit status and transaction hash |
| GET /withdrawals/fee-estimate | Withdrawal fee estimate. Requires the withdraw right |
| GET /withdrawals | Withdrawal status and transaction hash |
| POST /withdrawals | Withdraw only to an address saved in settings |
Amending an order in place, subaccounts, and outcome tokens are not part of trade API ver. 1.0. RevShare, links, and postback are partner API ver. 1.0.