Skip to main content
POST
/
markets
/
batch-trade
Batch Trades
curl --request POST \
  --url https://pm-t1.bxingupdate.com/bvapi/markets/batch-trade \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "orders": [
    {
      "marketId": "<string>",
      "outcome": "<string>",
      "side": "buy",
      "orderType": "market",
      "size": 123,
      "walletAddress": "<string>",
      "price": 123,
      "clientOrderId": "<string>"
    }
  ]
}
'
{
  "total": 123,
  "succeeded": 123,
  "failed": 123,
  "results": [
    {
      "orderId": "<string>",
      "status": "<string>",
      "submittedAt": "2023-11-07T05:31:56Z"
    }
  ]
}
Submit multiple trade orders in a single request. Each order is executed sequentially using the same logic as the single Trade endpoint.

Overview

Use this endpoint when you need to place multiple orders at once — for example, entering positions across several markets in a single skill cycle or placing hedged entries on both sides of a market. Each order in the batch is processed independently. If one order fails, the remaining orders still execute. The response includes individual results for every order.
Maximum 20 orders per batch request. Each order undergoes the same validation and risk checks as the single trade endpoint.

Example

curl -X POST "https://pm-t1.bxingupdate.com/bvapi/markets/batch-trade" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "orders": [
      {
        "marketConditionId": "0xabc123...",
        "marketQuestion": "Will BTC exceed $100k by June?",
        "outcome": "YES",
        "orderSize": 10,
        "price": 0.65,
        "isLimitOrder": true,
        "orderType": "GTC",
        "order": {
          "maker": "0x1111111111111111111111111111111111111111",
          "signer": "0x1111111111111111111111111111111111111111",
          "taker": "0x0000000000000000000000000000000000000000",
          "tokenId": "69136365945621600854789649488423522395843457249417452310260493085275775221076",
          "makerAmount": "650000",
          "takerAmount": "1000000",
          "side": "BUY",
          "expiration": "0",
          "nonce": "0",
          "feeRateBps": "0",
          "signature": "0xabcdef...",
          "salt": 599228746038,
          "signatureType": 0
        },
        "reasoning": "BTC momentum signal positive",
        "source": "sdk:my-skill"
      },
      {
        "marketConditionId": "0xdef456...",
        "marketQuestion": "Will ETH exceed $5k by June?",
        "outcome": "NO",
        "orderSize": 5,
        "price": 0.40,
        "isLimitOrder": true,
        "orderType": "GTC",
        "order": {
          "maker": "0x1111111111111111111111111111111111111111",
          "signer": "0x1111111111111111111111111111111111111111",
          "taker": "0x0000000000000000000000000000000000000000",
          "tokenId": "12345678901234567890123456789012345678901234567890123456789012345678",
          "makerAmount": "400000",
          "takerAmount": "1000000",
          "side": "BUY",
          "expiration": "0",
          "nonce": "0",
          "feeRateBps": "0",
          "signature": "0x123456...",
          "salt": 599228746039,
          "signatureType": 0
        },
        "reasoning": "ETH overvalued based on model",
        "source": "sdk:my-skill"
      }
    ]
  }'

Response

{
  "total": 2,
  "succeeded": 2,
  "failed": 0,
  "results": [
    {
      "success": true,
      "orderId": "0xabc...",
      "status": "live",
      "makingAmount": "650000",
      "takingAmount": "1000000",
      "venue": "polymarket",
      "isLimitOrder": true,
      "walletAddress": "0x1111111111111111111111111111111111111111",
      "signatureType": 0,
      "aiAgentId": "10000001",
      "userId": "26",
      "syncedToMkOrder": true,
      "syncedToStrategyLog": true,
      "orderVersion": 1,
      "collateralSymbol": "pUSD"
    },
    {
      "success": true,
      "orderId": "0xdef...",
      "status": "live",
      "makingAmount": "400000",
      "takingAmount": "1000000",
      "venue": "polymarket",
      "isLimitOrder": true,
      "walletAddress": "0x1111111111111111111111111111111111111111",
      "signatureType": 0,
      "aiAgentId": "10000001",
      "userId": "26",
      "syncedToMkOrder": true,
      "syncedToStrategyLog": true,
      "orderVersion": 1,
      "collateralSymbol": "pUSD"
    }
  ]
}

Response Fields

FieldTypeDescription
totalintegerTotal number of orders submitted
succeededintegerNumber of successfully executed orders
failedintegerNumber of failed orders
resultsarrayArray of individual trade results (same schema as Trade response)

Common Errors

CodeMeaning
400Invalid request body, empty orders array, or exceeds max
401Missing or invalid API key
500Server-side error

Notes

  • Orders are executed sequentially, not in parallel. Each order completes before the next begins.
  • Each order undergoes independent risk checks and Polymarket API submission.
  • A failed order does not stop subsequent orders from executing.
  • The orders field in each result matches the single trade response schema exactly.

Authorizations

Authorization
string
header
default:YOUR_API_KEY
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
orders
object[]
required

Array of trade orders to execute in batch (max 20)

Required array length: 1 - 20 elements

Response

200 - application/json

Batch trade results

total
integer

Total number of orders submitted

succeeded
integer

Number of successfully executed orders

failed
integer

Number of failed orders

results
object[]

Individual results for each order