SDM API Reference

Build trading integrations on Secure Digital Markets.

Use SDM WebSocket, REST, and FIX APIs to connect market data, order execution, RFQ, trade, balance, and instrument workflows for institutional digital asset trading.

REST sandboxtrade-sandbox.sdm.co
WebSocket sandboxwss://trade-sandbox.sdm.co/ws/v1
Source versionsTrading v1.4.0 / FIX v2.50

Environments

Sandbox and production use separate API keys. Confirm the target environment before signing requests, because host and path are part of the signature payload.

WebSocket sandboxwss://trade-sandbox.sdm.co/ws/v1
WebSocket productionwss://trade.sdm.co/ws/v1
REST sandboxhttps://trade-sandbox.sdm.co
REST productionhttps://trade.sdm.co
FIX connectivityHostname, port, SenderCompID, and TargetCompID are issued during onboarding.

Authentication

WebSocket and REST requests use API-key headers and a Base64 URL-safe HMAC SHA-256 signature. Keep the Base64 padding from the generated signature and never send API secrets in chat, email threads, tickets, or logs.

NameTypeRequiredDescription
ApiKeystringYesSDM API key issued for the selected sandbox or production environment.
ApiTimestampdatetimeYesISO-8601 UTC timestamp, for example 2019-02-13T05:17:32.000000Z.
ApiSignstringYesBase64 URL-safe HMAC SHA-256 signature created with the API secret.
WebSocket signature stringtext
GET
2019-02-13T05:17:32.000000Z
trade-sandbox.sdm.co
/ws/v1
REST signature stringtext
GET
2019-02-13T05:17:32.000000Z
trade-sandbox.sdm.co
/v1/symbols/BTC-USD/ohlcv/1D

WebSocket connection

Connect to the versioned WebSocket path with signed headers. After authentication succeeds, SDM sends a hello message containing the server timestamp and session ID.

WebSocketGETwss://<host>/ws/v1
Hello messagejson
{
  "type": "hello",
  "ts": "2019-10-16T10:41:23.168807Z",
  "session_id": "1109RQ13KXR00"
}

Subscriptions

Client requests use a non-zero reqid. Responses echo the request ID and may include a pagination token for follow-up page requests.

NameTypeRequiredDescription
reqidnumberYesRelated client request ID.
seqnumberYesSequence number for this request stream.
typestringYesResponse or stream type.
tagstringNoOptional tag echoed from the stream request.
initialbooleanNoMarks an initial snapshot payload.
actionstringNoUpdate or Remove.
dataobject[]NoResponse payload for the requested stream.
total_countnumberNoTotal records for paged streams.
tsdatetimeYesPublication timestamp in UTC.
Subscribejson
{
  "reqid": 1,
  "type": "subscribe",
  "streams": [
    {
      "name": "Security"
    }
  ],
  "ts": "2019-02-13T05:17:32.000000Z"
}
Pagejson
{
  "reqid": 2,
  "type": "page",
  "data": [
    {
      "name": "MarketDataSnapshot",
      "after": "<next-token>"
    }
  ]
}
Canceljson
{
  "reqid": 2,
  "type": "cancel"
}

Market data

Subscribe to instrument reference data, supported currencies, market data snapshots, and currency conversion streams.

WebSocketsubscribeMarketDataSnapshot
Market data snapshotjson
{
  "reqid": 5,
  "type": "subscribe",
  "streams": [
    {
      "name": "MarketDataSnapshot",
      "Symbol": "BTC-USD"
    }
  ]
}

Security fields

SecurityIDSymbolMinPriceIncrementMinSizeIncrementMinAmtIncrementMinimumSizeMaximumSizeQuoteCurrencyBaseCurrencyDefaultPriceIncrementDefaultSizeIncrementPriceDisplaySpecSizeDisplaySpecNormalSizeProductTypePositionCurrencySettlementCurrencyNotionalMultiplierExpirationSizeBucketsDisplaySymbolDescription

Currency fields

TimestampCurrencyIDSymbolMinIncrementDefaultIncrementDescription

Orders

Subscribe to ExecutionReport before sending orders. Quantities and prices should be encoded as decimal strings where precision matters.

WebSocketsendNewOrderSingle
NameTypeRequiredDescription
SymbolstringYesCurrency pair, for example BTC-USD.
ClOrdIDstringYesUnique client order ID. UUID recommended.
SidestringYesBuy or Sell.
OrdTypestringYesMarket, Limit, or RFQ.
OrderQtydecimal stringYesOrder quantity in units of Currency.
Pricedecimal stringConditionalRequired for limit orders.
CurrencystringNoQuantity currency. Defaults to the symbol base currency.
QuoteIDstringConditionalRequired when trading a specific RFQ quote.
RFQIDstringConditionalRequired when OrdType is RFQ.
TimeInForcestringYesGoodTillCancel, FillAndKill, or FillOrKill.
StrategystringNoOptional order strategy, including SteadyPace or StopLimit when enabled.
AllowedSlippagedecimal stringNoOptional absolute slippage for limit orders placed against RFQ.
ParametersobjectNoOptional order strategy parameters.
TransactTimedatetimeNoClient business timestamp in UTC.
New orderjson
{
  "reqid": 13,
  "type": "NewOrderSingle",
  "data": [
    {
      "Symbol": "BTC-USD",
      "ClOrdID": "4d489920-15da-11ec-b5e7-7f4881f01b7d",
      "Side": "Buy",
      "TransactTime": "2021-09-15T04:06:28.530000Z",
      "OrderQty": "0.5",
      "OrdType": "Limit",
      "Price": "43000",
      "Currency": "BTC",
      "TimeInForce": "GoodTillCancel",
      "Strategy": "Limit",
      "Parameters": {
        "ErrorAction": "Pause"
      }
    }
  ]
}

Order commands

OrderCancelRequestCancel an open order.
OrderCancelReplaceRequestModify an open order.
OrderControlRequestPause or resume an open order where enabled.

RFQ and post trade

Subscribe to trade and RFQ streams for quote lifecycle, accepted quote execution, and post-trade updates. Balance and user administration streams may require account-specific permissions.

QuoteSubscribe to available RFQ quote updates.
QuoteRequestRequest a quote for an eligible market.
QuoteCancelRequestCancel an active quote request.
ExecutionReportReceive execution updates when an accepted quote trades.

Strategy orders, withdrawal commands, Balance, Exposure, BalanceTransaction, User, and UserConfig should be enabled only when confirmed for the client account.

REST OHLCV

Use REST for historical OHLCV candles by symbol and resolution.

RESTGET/v1/symbols/<symbol>/ohlcv/<resolution>
OHLCV requesttext
GET /v1/symbols/<symbol>/ohlcv/<resolution>

GET /v1/symbols/BTC-USD/ohlcv/1h

FIX overview

The Secure Digital FIX API uses FIX 4.4 for market data subscriptions and order execution. SDM acts as the FIX acceptor for client sessions.

HostnameProvided by SDM.
PortProvided by SDM.
SenderCompIDProvided by SDM.
TargetCompIDProvided by SDM.
Session windowProvided by SDM.
API key and secretIssued separately for each environment.

A typical setup uses one market data session with recovery disabled and one order submission session with recovery enabled.

FIX logon

Authenticate with a FIX Logon(35=A). Put the Base64 URL-safe signature in RawData(96) and the API key in Password(554).

NameTypeRequiredDescription
35MsgTypeYesA for Logon.
108HeartBtIntYesHeartbeat interval.
141ResetSeqNumFlagNoReset sequence numbers.
95RawDataLengthYesSignature length.
96RawDataYesHMAC SHA-256 signature.
554PasswordYesAPI key.
Signature stringtext
SendingTime(52)
ASCII 01
MsgSeqNum(34)
ASCII 01
SenderCompID(49)
ASCII 01
TargetCompID(56)
Logon exampletext
8=FIX.4.4^A9=143^A35=A^A34=1^A49=CUSTOMER^A52=20220915-18:29:58.756^A56=Secure Digital^A95=44^A96=<signature>^A98=0^A108=300000^A141=Y^A554=<api-key>^A10=248^A

FIX market data

After logon, send MarketDataRequest(35=V) to subscribe to snapshots. Specify exactly one of MarketDepth(264) or NoSizeBucketsSegments(20020).

FIX35=VMarketDataRequest
NameTypeRequiredDescription
262MDReqIDYesUnique market data request ID.
263SubscriptionRequestTypeYes0 snapshot, 1 subscribe, or 2 unsubscribe.
264MarketDepthConditionalFull book, top of book, or depth level.
1070MDQuoteTypeNo0 indicative or 1 tradeable.
20020NoSizeBucketsSegmentsConditionalAggregated size buckets.
55SymbolYesCurrency pair, for example BTC-USD.

FIX orders

Submit market or limit orders with NewOrderSingle(35=D). Open FIX orders are canceled on disconnect by default unless CancelOnDisconnect=N is configured for the order.

FIX35=DNewOrderSingle
NameTypeRequiredDescription
1AccountConditionalRequired when multiple accounts are enabled.
11ClOrdIDYesClient order ID, max 36 characters. UUID recommended.
55SymbolYesCurrency pair.
54SideYes1 buy or 2 sell.
40OrdTypeYes1 market, 2 limit, or A limit all-in.
38OrderQtyYesOrder quantity.
15CurrencyNoQuantity currency. Defaults to base currency.
44PriceConditionalRequired for limit orders.
59TimeInForceYes1 GTC, 3 IOC, or 4 FOK.
60TransactTimeYesBusiness timestamp.
126ExpireTimeNoOptional expiration time for GTC orders.
168EffectiveTimeNoOptional activation time for staged orders.
847TargetStrategyNoOrder strategy type, for example StopLimit.
957NoStrategyParamsNoNumber of strategy parameter groups.
958StrategyParameterNameNoStrategy parameter name.
960StrategyParameterValueNoStrategy parameter value.
20030CancelOnDisconnectNoY or N. Defaults to Y.

Cancel, replace, and reports

OrderCancelRequest (F)Cancel an existing order.
OrderCancelReplaceRequest (G)Amend price, quantity, or market.
OrderCancelReject (9)Reject invalid cancel or replace requests.
ExecutionReport (8)Acknowledge, reject, update status, or report fills.

FIX sessions

FIX sessions support standard session-level messages, optional recovery, drop copy, and Security List messages for instrument validation.

Logon (A)Authenticate and start a session.
Heartbeat (0)Keep the session alive.
Test Request (1)Request heartbeat proof.
Resend Request (2)Request a missing sequence range.
Reject (3)Reject malformed or session-level messages.
Sequence Reset (4)Gap fill or reset sequence state.
Logout (5)End the session.

Troubleshooting

Most integration failures come from signature construction, clock drift, permissions, or invalid symbols.

Authentication failsCheck key, secret, host, path, and timestamp drift.
Signature invalidCheck newline order, query/body inclusion, Base64 URL encoding, and UTC time.
No response after subscribeCheck stream name and required stream parameters.
Order rejectedCheck symbol, side, quantity increment, price, and time-in-force.
Sequence errorsCheck FIX recovery settings and expected sequence numbers.

Reliability and errors

Treat retry behavior as part of the integration contract. Preserve IDs for reconciliation, retry only transient failures, and avoid logging secrets while keeping enough request context for support.

Retry policyUse bounded exponential backoff for transient network, rate limit, and unavailable responses.
Duplicate preventionKeep client request IDs and order IDs stable when retrying so downstream reconciliation is deterministic.
WebSocket recoveryReconnect, re-authenticate, resubscribe, and reconcile by request ID, sequence, and timestamp after a disconnect.
FIX recoveryUse the agreed session recovery settings, process Resend Request and Sequence Reset messages, and reconcile with ExecutionReport.
Operational logsLog request ID, environment, host, path, timestamp, and response code without recording API secrets.

Before production, confirm any client-specific rate limits, FIX recovery rules, and retry windows with the SDM onboarding team.

Onboarding checklist

Complete these steps before moving an integration into production.

  1. API key and API secret issued.
  2. Sandbox or production environment confirmed.
  3. Hostname, port, path, SenderCompID, and TargetCompID confirmed where applicable.
  4. IP allowlist completed if required.
  5. Client clock sync confirmed.
  6. First authentication test completed.
  7. First market data subscription completed.
  8. Order or RFQ permissions confirmed before live order testing.

Changelog

Version notes consolidated from the WebSocket/REST and FIX source documents.

Trading API 1.4.0Legacy note: added REST OHLCV endpoint.
Trading API 1.3.0Legacy note: added BalanceTransaction and NewWithdrawRequest.
Trading API 1.2.0Legacy note: changed selected transaction timestamp fields.
Trading API 1.1.0Legacy note: changed MaximumSize for Security to optional.
FIX API 2.50Legacy note: added description for order strategies.