OTC Trading

RFQ workflow and OTC order execution with external dealers

OTC Trading

This guide covers the OTC (Over-the-Counter) trading workflow for executing trades with external dealers.

Overview

OTC trading allows clients to execute large trades with external dealers, with the platform acting as an intermediary. This avoids impacting the public order book on the Marketplace.

Prerequisites

  • Authenticated session (JWT or API key)
  • CanTrade permission
  • Sub-account with venue = VENUE_OTC or OTC-enabled
  • Pair must have otcTradable = true

Step 1: Check OTC Listing

Before trading, verify that OTC trading is available for your desired pair.

Endpoint: GET /api/rest/v1/otc/listings/{pairId}

Request

curl -X GET "https://api.t-dx.com/api/rest/v1/otc/listings/79b1db24-7dc8-45d1-ab77-44318f872a8e" \
  -H "Authorization: Bearer <access-token>"

Response (200 OK)

{
  "result": {
    "id": "listing-uuid",
    "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
    "minIncrement": "0.01",
    "minRfqQuantity": "1.0",
    "minOrderQuantity": "0.1",
    "live": true,
    "monitoringThreshold": 10000,
    "createdAt": "2023-01-01T00:00:00Z"
  }
}

Listing Fields

FieldDescription
minIncrementMinimum price increment
minRfqQuantityMinimum quantity for RFQ
minOrderQuantityMinimum quantity for orders
liveWhether OTC trading is active

Step 2: Create OTC Order

Submit an OTC order for execution.

Endpoint: POST /api/rest/v1/otc/orders

Request

curl -X POST "https://api.t-dx.com/api/rest/v1/otc/orders" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
    "side": "SIDE_BUY",
    "type": "TYPE_LIMIT",
    "quantity": "10.00000000",
    "price": "45000.00",
    "timeInForce": "TIME_IN_FORCE_GOOD_TILL_CANCELED"
  }'

Request Fields

FieldTypeRequiredDescription
subAccountIdUUIDYesSub-account for the order
pairIdUUIDYesTrading pair ID
sideenumYesSIDE_BUY or SIDE_SELL
typeenumYesOrder type (see below)
quantitydecimalYesOrder quantity
pricedecimalNoLimit price (required for limit orders)
timeInForceenumNoTime in force policy
commentstringNoOptional order comment
clientOrderIdstringNoClient-provided identifier
drybooleanNoIf true, validates without creating
startAttimestampNoScheduled start time
endAttimestampNoExpiration time (required for TWAP)
parametersobjectNoOrder-type specific parameters

Order Types

TypeDescription
TYPE_LIMITLimit order at specified price
TYPE_MARKETMarket order
TYPE_LIMIT_TWAPTime-weighted average price
📘

Stop Orders Stop and stop-limit orders are created by adding stopParams to the parameters field. Use TYPE_MARKET with stopParams for a stop order, or TYPE_LIMIT with stopParams for a stop-limit order. See Stop Order Example below.

Time in Force

ValueDescription
TIME_IN_FORCE_GOOD_TILL_CANCELEDRemains active until filled or cancelled
TIME_IN_FORCE_IMMEDIATE_OR_CANCELFill immediately or cancel
TIME_IN_FORCE_FILL_OR_KILLFill completely or cancel

Response (200 OK)

{
  "result": {
    "id": "otc-order-uuid",
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
    "side": "SIDE_BUY",
    "type": "TYPE_LIMIT",
    "status": "STATUS_OPEN",
    "quantity": "10.00000000",
    "cumulativeQuantity": "0.00000000",
    "price": "45000.00",
    "timeInForce": "TIME_IN_FORCE_GOOD_TILL_CANCELED",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
}

Step 3: List OTC Orders

View your OTC orders.

Endpoint: GET /api/rest/v1/otc/orders/by-sub-account/{subAccountId}

Request

curl -X GET "https://api.t-dx.com/api/rest/v1/otc/orders/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804" \
  -H "Authorization: Bearer <access-token>"

Query Parameters

This endpoint supports standard pagination, sorting, and filtering.

Supported filters: status, side, pair_id

Response (200 OK)

{
  "result": [
    {
      "id": "otc-order-uuid",
      "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
      "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
      "side": "SIDE_BUY",
      "type": "TYPE_LIMIT",
      "status": "STATUS_FILLED",
      "quantity": "10.00000000",
      "cumulativeQuantity": "10.00000000",
      "price": "45000.00",
      "clientAmount": "449500.00",
      "timeInForce": "TIME_IN_FORCE_GOOD_TILL_CANCELED",
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:35:00Z"
    }
  ],
  "pagination": {
    "cursors": {
      "self": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "first": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "last": "",
      "next": "",
      "previous": ""
    }
  }
}

OTC Order Status Values

StatusDescription
STATUS_TENTATIVEOrder pending confirmation
STATUS_PENDINGOrder pending activation
STATUS_OPENOrder active in the market
STATUS_FILLEDFully executed
STATUS_CANCELEDCancelled
STATUS_REJECTEDRejected by system
STATUS_PENDING_CANCELCancel request pending

Step 4: Get Specific OTC Order

Endpoint: GET /api/rest/v1/otc/orders/by-sub-account/{subAccountId}/{orderId}

Request

curl -X GET "https://api.t-dx.com/api/rest/v1/otc/orders/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804/otc-order-uuid" \
  -H "Authorization: Bearer <access-token>"

Response (200 OK)

{
  "result": {
    "id": "otc-order-uuid",
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
    "side": "SIDE_BUY",
    "type": "TYPE_LIMIT",
    "status": "STATUS_FILLED",
    "quantity": "10.00000000",
    "cumulativeQuantity": "10.00000000",
    "price": "45000.00",
    "clientAmount": "449500.00",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:35:00Z"
  }
}

Step 5: Cancel OTC Order

Cancel an open OTC order.

Endpoint: DELETE /api/rest/v1/otc/orders/by-sub-account/{subAccountId}/{orderId}

Request

curl -X DELETE "https://api.t-dx.com/api/rest/v1/otc/orders/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804/otc-order-uuid" \
  -H "Authorization: Bearer <access-token>"

Response (200 OK)

Empty response on success.

Step 6: View OTC Trades

View executed OTC trades.

Endpoint: GET /api/rest/v1/otc/trades/by-sub-account/{subAccountId}

Request

curl -X GET "https://api.t-dx.com/api/rest/v1/otc/trades/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804" \
  -H "Authorization: Bearer <access-token>"

Query Parameters

This endpoint supports standard pagination and filtering.

Supported filters: order_id, side, pair_id

Sort restriction: OTC trades can only be sorted by executed_at:

  • sort=executed_at-desc (default)
  • sort=executed_at-asc

Note: Unlike other endpoints, sorting by created_at is not supported and will return a 400 error.

Response (200 OK)

{
  "result": [
    {
      "id": "otc-trade-uuid",
      "orderId": "otc-order-uuid",
      "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
      "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
      "side": "SIDE_BUY",
      "quantity": "10.00000000",
      "amount": "450000.00",
      "clientAmount": "449500.00",
      "executedAt": "2024-01-15T10:35:00Z"
    }
  ],
  "pagination": {
    "cursors": {
      "self": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "first": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "last": "",
      "next": "",
      "previous": ""
    }
  }
}

Step 7: Get Specific OTC Trade

Endpoint: GET /api/rest/v1/otc/trades/by-sub-account/{subAccountId}/{tradeId}

Request

curl -X GET "https://api.t-dx.com/api/rest/v1/otc/trades/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804/otc-trade-uuid" \
  -H "Authorization: Bearer <access-token>"

Step 8: View Quotes (Optional)

View quotes associated with your orders.

Endpoint: GET /api/rest/v1/quotes/by-sub-account/{subAccountId}

Request

curl -X GET "https://api.t-dx.com/api/rest/v1/quotes/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804" \
  -H "Authorization: Bearer <access-token>"

Query Parameters

This endpoint supports standard pagination, sorting, and filtering.

Supported filters: status, side, pair_id

Response (200 OK)

{
  "result": [
    {
      "id": "quote-uuid",
      "rfqId": "rfq-uuid",
      "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
      "status": "QUOTE_STATUS_ACCEPTED",
      "quantity": "10.00000000",
      "amount": "450000.00",
      "fees": "500.00",
      "clientAmount": "449500.00",
      "quoteSide": "ASK",
      "operationSide": "SIDE_BUY",
      "acceptedAt": "2024-01-15T10:31:00Z"
    }
  ],
  "pagination": {
    "cursors": {
      "self": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "first": "eyJTb3J0cyI6W10sIkZpbHRlcnMiOltdLCJJc0ZpcnN0Ijp0cnVlfQ==",
      "last": "",
      "next": "",
      "previous": ""
    }
  }
}

Quote Status Values

StatusDescription
QUOTE_STATUS_ACCEPTEDQuote accepted
QUOTE_STATUS_CONFIRMED_BY_COUNTERPARTYConfirmed by counterparty
QUOTE_STATUS_REJECTED_BY_COUNTERPARTYRejected by counterparty
QUOTE_STATUS_SETTLEDTrade settled
QUOTE_STATUS_MISSINGQuote not available

Get Specific Quote

Endpoint: GET /api/rest/v1/quotes/by-sub-account/{subAccountId}/rfq/{rfqId}

curl -X GET "https://api.t-dx.com/api/rest/v1/quotes/by-sub-account/7376524e-6b6b-4137-9719-7e07a7709804/rfq/rfq-uuid" \
  -H "Authorization: Bearer <access-token>"

TWAP Order Example

Create a TWAP (Time-Weighted Average Price) order:

curl -X POST "https://api.t-dx.com/api/rest/v1/otc/orders" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
    "side": "SIDE_BUY",
    "type": "TYPE_LIMIT_TWAP",
    "quantity": "100.00000000",
    "price": "45000.00",
    "startAt": "2024-01-15T10:00:00Z",
    "endAt": "2024-01-15T18:00:00Z",
    "parameters": {
      "twapParams": {
        "clipSize": "0.5"
      }
    }
  }'

Stop Order Example

Create a stop-limit order that triggers when the price reaches 44000.00:

curl -X POST "https://api.t-dx.com/api/rest/v1/otc/orders" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
    "side": "SIDE_BUY",
    "type": "TYPE_LIMIT",
    "quantity": "10.00000000",
    "price": "45000.00",
    "timeInForce": "TIME_IN_FORCE_GOOD_TILL_CANCELED",
    "parameters": {
      "stopParams": {
        "triggerPrice": "44000.00"
      }
    }
  }'

For a stop (market) order, use TYPE_MARKET instead of TYPE_LIMIT and omit the price field:

curl -X POST "https://api.t-dx.com/api/rest/v1/otc/orders" \
  -H "Authorization: Bearer <access-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subAccountId": "7376524e-6b6b-4137-9719-7e07a7709804",
    "pairId": "79b1db24-7dc8-45d1-ab77-44318f872a8e",
    "side": "SIDE_SELL",
    "type": "TYPE_MARKET",
    "quantity": "10.00000000",
    "parameters": {
      "stopParams": {
        "triggerPrice": "40000.00"
      }
    }
  }'

Stop Parameters

FieldTypeRequiredDescription
triggerPricedecimalYesThe price that, once reached, will trigger the order

Error Scenarios

StatusCodeDescription
400INVALID_ARGUMENTInvalid quantity, price, or parameters
403NOT_ENOUGH_FUNDSInsufficient balance for trade
403PERMISSION_DENIEDNo trade permission
404NOT_FOUNDOrder or trade not found
422FAILED_PRECONDITIONOTC trading not enabled for pair

Related




  © 2025 Taurus SA. All rights reserved.