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 /timeServer clock
GET /marketsMarkets 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}/bookResting orders, including other players, without their account ids
GET /markets/{event_id}/positionMatched and resting size on each outcome, and the worst matched loss
GET /markets/{event_id}/resolutionOracle prices, winner, winning-side fee, and payout on your matches
POST /ordersRest an order: outcome, stake, odds
POST /orders/batchBoth outcomes in one call. Each order has its own idempotency key
POST /orders/{order_id}/takeTake another order in full or in part
GET /ordersYour 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 /ordersCancel unmatched bot orders on one market or on all markets
GET /fillsYour recent matches
POST /heartbeatIf the bot goes silent, unmatched orders of this key are cancelled while bets are open
GET /stream/bookMarket open, book, bet cutoff, and resolution. No account ids
GET /stream/accountYour fills and cancels, plus market life
GET /balancesAvailable and locked USDC and USDT
GET /deposit-addressesDeposit address and network. The bot sends the coins
GET /depositsCredit status and transaction hash
GET /withdrawals/fee-estimateWithdrawal fee estimate. Requires the withdraw right
GET /withdrawalsWithdrawal status and transaction hash
POST /withdrawalsWithdraw only to an address saved in settings

Download OpenAPI 1.0.0

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.

trade API ver. 1.0 · TakePair