idb

IDB Create OTC Trade

Enables authorized inter-dealer broker to book a dual-sided OTC trade on behalf of two clients.

This endpoint uses the signing format which does not require strict field ordering and addition of null fields in the request body. Prices do not require strict precision. Eg. for asset precision of 4 - 100, 100.0, 100.00, 100.000 and 100.0000 are all accepted.

  • requires bearer token in authorization header
post/v2/idb/otc-trades

Request

Headers

BX-SIGNATUREstring required

signature obtained using the signing format

BX-TIMESTAMPstring required

timestamp is the number of milliseconds since EPOCH

BX-NONCEstring required

nonce is a client side incremented unsigned 64 bit integer

Request body

commandTypestring required

Specifies the command type and must be 'V1IdbCreateOtcTrade' to indicate the submission of an OTC trade

idbRemarksstring

text field for IDB's internal reference to a trade, max length is 255 characters

Example request

{
  "commandType": "V1IdbCreateOtcTrade",
  "idbRemarks": "otc trades between abc and xyz client",
  "maker": {
    "tradingAccountId": "111000000000001",
    "remarks": "confirmed over the phone"
  },
  "taker": {
    "tradingAccountId": "111000000000002"
  },
  "trades": [
    {
      "symbol": "BTC-USDC-PERP",
      "side": "BUY",
      "price": "98213.0000",
      "quantity": "1.50000000"
    },
    {
      "symbol": "XRP-USDC-PERP",
      "side": "SELL",
      "price": "2.6600",
      "quantity": "50.000000"
    }
  ]
}

Response

Status OK. The IDB create OTC trade command was successfully acknowledged. To check the current status of the OTC trades, query IDB Get OTC Trades using sharedMatchKey received in the response payload.

messagestring required

message indicating the status of the request

sharedMatchKeystring required

system-generated unique identifier for the dual-sided brokered OTC trade

Example response

{
  "message": "Command acknowledged - IdbCreateOtcTrade",
  "sharedMatchKey": "a40d0c302d0448ce8e144c8312dd6ef0",
  "maker": {
    "requestId": "100000000000000147",
    "otcTradeId": "200000000000000098"
  },
  "taker": {
    "requestId": "100000000000000148",
    "otcTradeId": "200000000000000099"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.