### FIX Session Management Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Details on starting, recovering, and ending FIX sessions. ```APIDOC ## FIX Session Management ### Starting a Session FIX API acts as the acceptor in the FIX connection. Sequence numbers begin at 1 and must increment with each message. Duplicate or out-of-order sequence numbers will result in rejection. Sequence numbers are not reset on the server side during the logon process. ### Standard Session Recovery Use `Standard ResendRequest` to recover a session: 1. Send a message with `35=2` specifying the required sequence number range. 2. Receive replay messages with `PossDupFlag=Y`. Apply changes according to the FIX protocol. If a message with that sequence number was already received, ignore it; otherwise, process it normally. 3. Continue trading. ### Ending a Session The client may optionally send a `Logout (35=5)` message. The exchange does not consider its absence an abnormal condition. The server may send a `Logout (35=5)` message with the `Text (58)` field indicating the reason. ``` -------------------------------- ### POST /api/v1/order/new Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Creates a new BUY or SELL order on the Exchange. This call is asynchronous. ```APIDOC ## POST /api/v1/order/new ### Description Creates a new BUY or SELL order on the Exchange. This call is asynchronous, so the response with Pending New is simply an acceptance of the request, but not necessarily mean it is confirmed into order book. The drop copy subscription can be used to check when the order is successfully created. See FIX Spot Order Life Cycle and ExecutionReport for details. ### Method POST ### Endpoint /api/v1/order/new ### Parameters #### Request Body - **ClOrdID** (string) - Required - Unique identifier for Order as assigned by the buy-side. Uniqueness must be guaranteed across trading sessions. - **Currency** (string) - Optional (Depends) - Required for OTC Order. Indicates whether `OrderQty` is for Base Currency or Quote Currency - **ExecInst** (MultipleCharValue) - Optional (Limit Orders Only) - Options are: `6`: `POST_ONLY`, `8`: `SMART_POST_ONLY`, Or leave empty - **OrderQty** (qty) - Depends - For LIMIT Orders, MARKET orders only: Order Quantity - **OrdType** (string) - Required - `1`: `MARKET`, `2`: `LIMIT`, `D`: `PREVIOUSLY_QUOTED`. Must be `D` for OTC RFQ Order. Must be `1` or `2` for OTC RFS Order. - **Price** (price) - Depends - For LIMIT orders only: Unit price - **Side** (string) - Required - `1`: `BUY`, `2`: `SELL` - **Symbol** (string) - Required - e.g., ETH_CRO, BTC_USDT - **TimeInForce** (char) - Optional (Limit Orders Only) - Options are: `1`: `GOOD_TILL_CANCEL` (Default if unspecified), `3`: `IMMEDIATE_OR_CANCEL`, `4`: `FILL_OR_KILL`. - **TransactTime** (string) - Required - Time this order request was initiated/released by the trader or trading system. i.e. 20190525-08:26:38.989 (in GMT) - **QuoteID** (string) - Depends - Required for OTC Order. Must be `RFS` for OTC RFS Order - **CashOrderQty** (price) - Depends - For MARKET (BUY) orders only: Notional amount to spend - **CashMargin** (char) - Optional - `1`: `SPOT` places order without margin (default for Spot), `2`: `SPOT` places order with margin - **TriggerPriceType** (char) - Optional - which price to use for ref_price: `2`: `LAST_PRICE` (default for Spot), `I`: `INDEX_PRICE`, `M`: `MARK_PRICE` - **SelfMatchPreventionScope** (string) - Optional - Possible Values: `M`: Matches Master or Sub a/c, `S`: Matches Sub a/c only. Note: orderbook-specific settings takes higher precedence. - **SelfMatchPreventionInstruction** (string) - Optional* - Mandatory if SelfMatchPreventionScope is set. Possible Values: `1`: Cancel Taker, `2`: Cancel Maker, `3`: Cancel Both Maker and Taker - **SelfMatchPreventionID** (string of number) - Optional* - Optional Field. Possible Value: 0 to 32767. Default Value: If SelfMatchPreventionScope & SelfMatchPreventionInstruction are not specified, REJECT. If SelfMatchPreventionScope is specified, default value = 0. Note: orderbook-specific settings takes higher precedence. - **CommissionCurrency** (string) - Optional - Fee currency for trade. Only present if this message was the result of a fill. Valid Values: [SPOT] Buy - Base/Quote token/USD/USDT/EUR, [SPOT] Sell - Quote token/USD/USDT/EUR, [DERIV] Buy/Sell - USD/USDT/EUR. Example: If a client would like to BUY CRO/BTC, the default fee token is CRO, valid tokens are CRO/BTC/USD/USDT/EUR. If a client would like to SELL CRO/BTC, the default fee token is BTC, valid tokens are BTC/USD/USDT/EUR. If a client would like to BUY/SELL BTCUSD-PERP, the default fee token is USD, valid tokens are USD/USDT/EUR. If a client has an insufficient balance in their preferred fee token, the system will switch to the default fee token. - **BrokerId** (string) - Optional - Optional Field, Brokder ID of the client. - **ReceiveWindow** (int) - Optional - This field is for setting the latency threshold. By default, if this field is not set explicitly, default value 5000 (i.e. 5000 milliseconds) will be applied. If this field is set out of valid range, default value 5000 will be applied. The effective value of this field, is used for checking against the time difference between current time when message is received and SendingTime (Tag50) from request message. If the difference is larger than effective ReceiveWindow value, the order will be **rejected**. Valid Range of values (in milliseconds): 100 - 5000 **Mandatory parameters based on `OrdType`:** OrdType | Side | Additional Mandatory Parameters ---|---|--- `1`: `MARKET` | `1`: `BUY` | `CashOrderQty` or `OrderQty`, mutually exclusive `1`: `MARKET` | `2`: `SELL` | `OrderQty` `2`: `LIMIT` | `1`: `BUY` | `OrderQty`, `Price` `2`: `LIMIT` | `2`: `SELL` | `OrderQty`, `Price` ### Request Example ```json { "ClOrdID": "unique_order_id_123", "Symbol": "BTC_USDT", "Side": "1", "OrderQty": "0.001", "OrdType": "2", "Price": "50000.00", "TransactTime": "20230101-10:00:00.000" } ``` ### Response #### Success Response (200) - **OrderID** (string) - Unique identifier for the order. - **ClOrdID** (string) - Unique identifier for the order as assigned by the buy-side. - **Status** (string) - The status of the order (e.g., 'New', 'PartiallyFilled', 'Filled', 'Canceled'). #### Response Example ```json { "OrderID": "order_id_abc", "ClOrdID": "unique_order_id_123", "Status": "New" } ``` ``` -------------------------------- ### Order Status Request Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html An ExecutionReport with ExecType=I is returned for order status requests. This section also covers the rejection scenario for unknown orders. ```APIDOC ## ExecutionReport (Order Status) ### Description An ExecutionReport (35=8) with ExecType=I (Order Status) is returned. This section also details the response when an order status request is rejected. ### Response Attributes #### Success Response (ExecType=I) - **MsgType** (string, Y) - Must be `35=8`. - **ExecType** (string, Y) - Must be `150=I`. - **TotNumReports** (number, N) - Must be `0` if no match, otherwise not populated. - **LastRptRequested** (number, N) - Must be `Y`. #### Rejected Order Status Response - **MsgType** (string, Y) - Must be `35=8`. - **ExecType** (string, Y) - Must be `150=I`. - **OrdStatus** (String, Y) - Must be `39=8` (Rejected). - **CumQty** (number, Y) - Must be `14=0`. - **LeavesQty** (number, Y) - Must be `151=0`. - **Comment** (String, N) - Rejected Reason / code. - **OrdRejReason** (number, N) - Possible values: `5` (Unknown Order), `8` (Stale Order), `13` (Incorrect quantity), `99` (Other). - **TotNumReports** (number, N) - Must be `0` if no match, otherwise not populated. - **LastRptRequested** (number, N) - Must be `Y`. See ExecutionReport for further details. ``` -------------------------------- ### ExecutionReport (35=8) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Provides details about order executions, including fills, cancellations, and rejections. ```APIDOC ## ExecutionReport (35=8) ### Description Provides details about order executions, including fills, cancellations, and rejections. ### Method POST ### Endpoint /executionReport ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **35** (string) - Required - Message Type (always '8' for ExecutionReport) - **11** (string) - Required - Client-selected order ID. - **41** (string) - Depends - ClOrdID of the previous non-rejected order. Required for responses to OrderCancelReplaceRequest or OrderCancelRequest. - **18** (string) - Optional - Instructions for order handling on exchange. Can contain multiple instructions separated by space. - **19** (string) - Optional - For CDC internal reference only. - **37** (string) - Required - Server-assigned order ID. - **17** (string) - Required - Unique execution ID. - **55** (string) - Required - Symbol name. - **54** (string) - Required - Side ('1' for buy, '2' for sell). - **38** (number) - Required - Original order quantity. - **44** (number) - Optional - Original order price. - **150** (string) - Required - Reason for this message (ExecType). - **39** (string) - Required - Order status. - **14** (number) - Required - Quantity of order that has already been filled. - **151** (number) - Required - Quantity of order that is still open. - **636** (string) - Optional - Indicates if the order is currently being worked ('Y' or 'N'). - **60** (string) - Optional - Time of the order update. - **6616** (string) - Optional - TransactTime when order is created. - **31** (number) - Required - Fill price. Only present if this message was the result of a fill. - **32** (number) - Required - Fill quantity. Only present if this message was the result of a fill. - **851** (string) - Optional - Taker or maker fill indicator. Only present if this message was the result of a fill. - **6** (number) - Required - Average fill price for all fills in order. Only present if this message was the result of a fill. - **12** (number) - Optional - Fee for trade. Only present if this message was the result of a fill. - **2643** (string) - Optional - Fee currency for trade. Only present if this message was the result of a fill. - **13** (string) - Required - Commission type (always '3' for absolute). - **103** (string) - Optional - Reason the order was rejected. Only present on rejected NewOrderSingle requests. - **58** (string) - Optional - Description of the reason the order was rejected. Only present on rejected NewOrderSingle requests. - **544** (string) - Optional - Message corresponds to order type ('1' for spot, '2' for margin, '3' for liquidation). - **880** (string) - Optional - Trade match ID. - **10060** (string) - Optional - TransactTime when order is getting partially or fully filled. - **20101** (number) - Optional - Number of orders matched for this trade execution. - **20102** (number) - Optional - Order entry index for matched orders. Only appears if it is a Maker's Order. ### Request Example ```json { "35": "8", "11": "order123", "37": "123456", "17": "123456", "55": "BTC_USDT", "54": "1", "38": 1.2, "150": "A", "39": "0", "14": 0.4, "151": 0.8, "31": 7999.25, "32": 0.4, "6": 7999.25, "13": "3" } ``` ### Response #### Success Response (200) - **35** (string) - Message Type ('8' for ExecutionReport) - **11** (string) - Client-selected order ID. - **41** (string) - ClOrdID of the previous non-rejected order. - **18** (string) - Instructions for order handling. - **19** (string) - For CDC internal reference only. - **37** (string) - Server-assigned order ID. - **17** (string) - Unique execution ID. - **55** (string) - Symbol name. - **54** (string) - Side ('1' for buy, '2' for sell). - **38** (number) - Original order quantity. - **44** (number) - Original order price. - **150** (string) - Reason for this message (ExecType). - **39** (string) - Order status. - **14** (number) - Quantity of order that has already been filled. - **151** (number) - Quantity of order that is still open. - **636** (string) - Indicates if the order is currently being worked ('Y' or 'N'). - **60** (string) - Time of the order update. - **6616** (string) - TransactTime when order is created. - **31** (number) - Fill price. - **32** (number) - Fill quantity. - **851** (string) - Taker or maker fill indicator. - **6** (number) - Average fill price. - **12** (number) - Fee for trade. - **2643** (string) - Fee currency for trade. - **13** (string) - Commission type. - **103** (string) - Reason the order was rejected. - **58** (string) - Description of the reason the order was rejected. - **544** (string) - Message corresponds to order type. - **880** (string) - Trade match ID. - **10060** (string) - TransactTime when order is getting partially or fully filled. - **20101** (number) - Number of orders matched for this trade execution. - **20102** (number) - Order entry index for matched orders. #### Response Example ```json { "35": "8", "11": "order123", "37": "123456", "17": "123456", "55": "BTC_USDT", "54": "1", "38": 1.2, "150": "A", "39": "0", "14": 0.4, "151": 0.8, "31": 7999.25, "32": 0.4, "6": 7999.25, "13": "3" } ``` ``` -------------------------------- ### FIX Logon (35=A) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html The Logon message is used to initiate a FIX session. It requires a digital signature generated via HMAC-SHA256 using the API Secret as the key. ```APIDOC ## FIX Logon (35=A) ### Description The Logon (35=A) message is invoked once per session to authenticate the client. It requires the API Key as UserName (553) and a Digital Signature as Password (554). ### Parameters #### Request Body - **35** (string) - Required - MsgType: A - **553** (string) - Required - UserName: API Key - **554** (string) - Required - Password: Digital Signature (HMAC-SHA256 hex string) - **34** (number) - Required - MsgSeqNum - **96** (string) - Required - RawData: Nonce ### Authentication The Digital Signature is generated by hashing concatenated request parameters with the API Secret using HMAC-SHA256. ``` -------------------------------- ### Market Data Snapshot/Full Refresh API Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Provides market data, such as order book or trade information, in response to a Market Data Request. ```APIDOC ## GET /api/market/data/snapshot ### Description Retrieves market data, including order book or trade information, for a given symbol. This message is used as a response to a Market Data Request 'V' message. ### Method GET ### Endpoint /api/market/data/snapshot ### Parameters #### Query Parameters - **MDReqID** (string) - Required - Market Data channel identifier. Example: `book.BTC_USDT.50`, `trade.ETH_CRO`. - **MDEntryID** (string) - Optional - Trade ID or sequence ID in order book. - **Symbol** (string) - Required - The symbol for which market data is requested. - **MDEntryTimeMs** (number) - Required - Timestamp of the market data entry in milliseconds. - **NoMDEntries** (number) - Required - Number of market data entries. - **MDUpdateAction** (string) - Required - Action type for the market data update. Possible values: `0` (New), `1` (Update), `2` (Delete). - **MDEntryType** (string) - Required - Type of market data entry. Possible values: `0` (Bid), `1` (Offer), `J` (Empty Book), `2` (Trade). - **MDEntryPx** (number) - Required - Price of the market data entry. - **MDEntrySize** (number) - Required - Size of the market data entry. - **NumberOfOrders** (number) - Optional - Number of orders for this entry. ### Response #### Success Response (200) - **MDReqID** (string) - Market Data channel identifier. - **MDEntryID** (string) - Trade ID or sequence ID in order book. - **Symbol** (string) - The symbol for which market data is provided. - **MDEntryTimeMs** (number) - Timestamp of the market data entry in milliseconds. - **NoMDEntries** (number) - Number of market data entries. - **MDUpdateAction** (string) - Action type for the market data update. - **MDEntryType** (string) - Type of market data entry. - **MDEntryPx** (number) - Price of the market data entry. - **MDEntrySize** (number) - Size of the market data entry. - **NumberOfOrders** (number) - Number of orders for this entry. #### Response Example ```json { "MDReqID": "book.BTC_USDT.50", "MDEntryID": "12345", "Symbol": "BTCUSDT", "MDEntryTimeMs": 1678886400000, "NoMDEntries": 2, "MDUpdateAction": "0", "MDEntryType": "0", "MDEntryPx": 25000.50, "MDEntrySize": 0.1, "NumberOfOrders": 10 } ``` ``` -------------------------------- ### Market Data Request Reject Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Response when a Market Data Request cannot be honored. ```APIDOC ## MarketDataRequestReject (35=Y) ### Description Indicates that the Market Data Request could not be honored due to business or technical reasons. ### Response Attributes #### Error Response - **MDReqID** (Number, Y) - Must refer to the `MDReqID` of the original request. - **MDReqRejReason** (String, N) - Reject reason. - **NoAltMDSource** (Number, N) - Number of alternative market data sources. - **AltMDSourceID** (Number, N) - Identifier for an alternative market data source. - **Text** (String, N) - Human-readable rejection reason. - **EncodedTextLen** (Number, N) - Length of the `EncodedText` field. - **EncodedText** (String, N) - Encoded representation of the `Text` field. ``` -------------------------------- ### FIX Connectivity Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Information on establishing a FIX session using AWS private link. ```APIDOC ## FIX Connectivity To establish a FIX session, FIX clients must set up or use the AWS private link connection. ``` -------------------------------- ### Market Data Request Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Subscribes to Market Data, including Order Book and Trades. ```APIDOC ## MarketDataRequest (35=V) ### Description Subscribes to Market Data, including Order Book and Trades. ### Parameters #### Request Body - **MDReqID** (string, Y) - Market Data channel. Possible values: `book.{Symbol}.{MarketDepth}`, e.g. `book.BTC_USDT.50`; `trade.{Symbol}`, e.g. `trade.ETH_CRO`. - **SubscriptionRequestType** (string, Y) - Possible values: `1` (Subscribe), `2` (Unsubscribe). - **MarketDepth** (number, Y) - Can be `1` or `150` when `MDReqID` is for book data. Must be `0` when `MDReqID` is for trade data. - **MDUpdateType** (number, Y) - Must be `1` (Incremental Refresh). - **AggregatedBook** (boolean, Y) - Must be `Y` for book data, `N` for trade data. - **MDImplicitDelete** (boolean, Y) - Must be `N`. - **NoMDEntryTypes** (number, Y) - Must be `2` for book data, `1` for trade data. - **MDEntryType** (string, Y) - Possible values: `0` (Bid), `1` (Offer), `2` (Trade). For book data, both `0` and `1` must be included. For trade data, `2` must be included. - **NoRelatedSym** (number, Y) - Must be `1`. - **Symbol** (string, Y) - Must match the symbol in `MDReqID`. ### Response Attributes See MarketDataIncrementalRefresh and MarketDataRequestReject for details. ``` -------------------------------- ### MassOrder (35=DJ) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html The MassOrder message allows for the addition or cancellation of multiple unrelated orders with a single message. Individual orders within a MassOrder can have varying attributes and are treated as stand-alone. ```APIDOC ## POST /api/massorder ### Description Submits a MassOrder request to add or cancel multiple orders. ### Method POST ### Endpoint /api/massorder ### Parameters #### Request Body - **MassOrderRequestID** (string) - Required - Request ID. Will be echoed back in the respective Pending New or Pending Cancel messages. - **OrderResponseLevel** (number) - Required - Must be `2`: Ack each order. - **TotNoOrderEntries** (number) - Required - Specifies the total number of order entries, from 1 to 10. - **CommissionCurrency** (string) - Optional - Fee currency for trade. Only present if this message was the result of a fill. - **LastFragment** (boolean) - Required - Must be `Y`. - **NoOrderEntries** (number) - Required - Specifies the number of order entries, from 1 to 10. Must be the same as Tag `2432`. - **OrderEntryAction** (number) - Required - Specifies the action for the order entry. `1`: Add, `3`: Cancel. When Tag `OrderEntryAction` = `1`, fields as in NewOrderSingle are allowed. When Tag `OrderEntryAction` = `3`, fields as in OrderCancelRequest are allowed. ### Request Example ```json { "MassOrderRequestID": "request123", "OrderResponseLevel": 2, "TotNoOrderEntries": 2, "LastFragment": true, "NoOrderEntries": 2, "OrderEntryAction": 1, "Orders": [ { "Symbol": "BTC-USD", "Side": "BUY", "OrderQty": 100, "Price": 50000, "OrdType": "LIMIT", "TimeInForce": "GTC" }, { "Symbol": "ETH-USD", "Side": "SELL", "OrderQty": 50, "Price": 3000, "OrdType": "LIMIT", "TimeInForce": "GTC" } ] } ``` ### Response #### Success Response (200) MassOrder sends 35=D or 35=F in batch respectively. Each order will follow their respective execution report. See ExecutionReport for details. #### Response Example ```json { "MassOrderRequestID": "request123", "Status": "PartiallyFilled", "Orders": [ { "OrderID": "order1", "ExecID": "exec1", "ExecType": "PARTIAL_FILL", "LeavesQty": 50, "CumQty": 50 }, { "OrderID": "order2", "ExecID": "exec2", "ExecType": "NEW", "LeavesQty": 50, "CumQty": 0 } ] } ``` ``` -------------------------------- ### Market Data Incremental Refresh Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Response for Market Data Requests, providing incremental updates. ```APIDOC ## MarketDataIncrementalRefresh (35=X) ### Description Response for Market Data Request, providing incremental updates. ### Response Attributes #### Success Response - **MDReqID** (string, Y) - Market Data channel identifier. - **MDEntryID** (string, N) - Trade ID when `MDEntryType` is `2`. Sequence ID in the order book. - **MDEntryRefID** (string, N) - Referring to the previous `MDEntryID` in the order book. - **Symbol** (string, Y) - Trading symbol. - **MDEntryTimeMs** (number, Y) - Epoch time in milliseconds. - **NoMDEntries** (number, Y) - Number of market data entries. - **MDUpdateAction** (string, Y) - Possible values: `0` (New), `1` (Update), `2` (Delete). - **MDEntryType** (string, Y) - Possible values: `0` (Bid), `1` (Offer), `J` (Empty Book), `2` (Trade). - **MDEntryPx** (number, Y) - Price of the market data entry. - **MDEntrySize** (number, Y) - Size of the market data entry. - **NumberOfOrders** (number, N) - Number of orders for this entry. - **TakerSide** (string, N) - Liquidity taker side: `1` (Buyer), `2` (Seller). - **TrdMatchID** (string, N) - Trade match ID. ``` -------------------------------- ### Logout (35=5) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html The Logout message initiates or confirms the termination of a FIX session. ```APIDOC ## Logout (35=5) ### Description The Logout (5) message initiates or confirms the termination of a FIX session. Disconnection without this message is considered an abnormal condition. ### Parameters #### Request Body - **58** (string) - Optional - Text - **1409** (number) - Optional - SessionStatus (0=active, 4=logout complete, 5=invalid credentials, 6=locked, 7=not allowed) ``` -------------------------------- ### SecurityList (35=y) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html The SecurityList message is sent by the Gateway in response to a SecurityListRequest (35=x) to provide instrument details in chunks. ```APIDOC ## SecurityList (35=y) ### Description The Gateway acknowledges a SecurityListRequest (35=x) by sending one or more SecurityList messages. Instruments are divided into chunks to manage message size. ### Parameters - **320** (String) - Required - SecurityReqID: Unique identifier from the request message. - **322** (String) - Required - SecurityResponseID: Identifier for the response message. - **560** (Number) - Required - SecurityRequestResult: 0=Valid, 2=Not found, 3=Not authorised, 4=Unavailable. - **893** (String) - Required - LastFragment: Y=Last message in sequence, N=Not last. - **146** (Number) - Required - NoRelatedSym: Number of repeating symbols. - **55** (String) - Required - Symbol: Fully qualified product symbol. - **870** (Number) - Optional - NoInstrAttrib: Number of repeating InstrAttrib group entries. - **871** (Number) - Optional - InstrAttribType: Type of instrument attribute (e.g., 1000=Display name, 1001=Base currency). - **872** (String) - Optional - InstrAttribValue: Value of instrument attribute. ``` -------------------------------- ### Security Definition Request API Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Allows clients to request details of a tradable instrument using a Security Definition Request (35=c) message. ```APIDOC ## POST /api/security/definition/request ### Description Sends a Security Definition Request (35=c) to retrieve details of a tradable instrument. ### Method POST ### Endpoint /api/security/definition/request ### Parameters #### Request Body - **SecurityReqID** (String) - Required - The unique identifier of this request. - **SecurityRequestType** (String) - Required - Type of security request. Valid values: 0 (Request Security identity and specifications). - **Symbol** (String) - Required - The unique identifier of the instrument. - **SubscriptionRequestType** (String) - Required - Type of subscription. Valid values: 0 (Snapshot), 1 (Snapshot and subscribe), 2 (Unsubscribe). ### Request Example ```json { "SecurityReqID": "req123", "SecurityRequestType": "0", "Symbol": "BTCUSDT", "SubscriptionRequestType": "1" } ``` ### Response #### Success Response (200) - **SecurityReqID** (String) - The unique identifier of the request. - **SecurityResponseID** (String) - Identifier for the Security Definition message. - **SecurityResponseType** (String) - Response type. Valid values: 1 (Accept security proposal as is). - **Symbol** (String) - The fully qualified product symbol. - **NoInstrAttrib** (Number) - Number of repeating InstrAttrib group entries. - **InstrAttribType** (Number) - Type of instrument attribute. - **InstrAttribValue** (String) - Value of instrument attribute. #### Response Example ```json { "SecurityReqID": "req123", "SecurityResponseID": "resp456", "SecurityResponseType": "1", "Symbol": "BTCUSDT", "NoInstrAttrib": 3, "InstrAttribType": [ 1000, 1001, 1005 ], "InstrAttribValue": [ "Bitcoin/TetherUS", "BTC", "0.01" ] } ``` ``` -------------------------------- ### BusinessMessageReject (35=j) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html The BusinessMessageReject message is used to reject application-level messages that pass session-level validation but fail business-level rules. ```APIDOC ## BusinessMessageReject (35=j) ### Description Rejects an application-level message that fulfills session-level rules but cannot be processed due to business-level constraints. ### Parameters - **35** (String) - Required - MsgType: Must be 35=j. - **45** (String) - Required - RefSeqNum: MsgSeqNum of the rejected message. - **372** (String) - Required - RefMsgType: The MsgType of the referenced message. - **379** (String) - Optional - BusinessRejectRefID: Value of the business-level ID field on the referenced message. - **380** (String) - Required - BusinessRejectReason: 0=Other, 1=Unknown ID, 2=Unknown Security, 3=Unsupported Message Type, 4=Application not available, 5=Conditionally Required Field Missing, 6=Not authorized, 7=DeliverTo firm not available. - **58** (String) - Optional - Text: Reason for rejection. - **19** (String) - Optional - ExecRefID: Internal reference. ``` -------------------------------- ### TestRequest Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html The Test Request message forces a heartbeat from the opposing application to verify communication. ```APIDOC ## POST /api/testrequest ### Description Sends a Test Request message to initiate a heartbeat from the opposing application. This is used to check sequence numbers or verify communication line status. ### Method POST ### Endpoint /api/testrequest ### Parameters #### Request Body - **TestReqID** (string) - Required - Identifier included in the Test Request message to be returned in the resulting Heartbeat message. ``` -------------------------------- ### OrderStatusRequest (35=H) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Retrieves details on open orders in the Order Management Flow. ```APIDOC ## OrderStatusRequest (35=H) ### Description Get details on a particular OPEN Orders only in Order Management Flow. Not available in Drop Copy Flow. ### Method POST ### Endpoint /orderStatusRequest ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **35** (string) - Required - Message Type (always 'H' for OrderStatusRequest) - **55** (string) - Required - Symbol name. - **11** (string) - Depends - Unique identifier for Order as assigned by the buy-side. Either tag11 or tag37 must be specified. - **37** (number) - Depends - OrderID of the order to request. Either tag11 or tag37 must be specified. ### Request Example ```json { "35": "H", "55": "BTC_USDT", "11": "order123" } ``` ### Response #### Success Response (200) - **35** (string) - Message Type ('8' for ExecutionReport, indicating order status details) - **11** (string) - Client-selected order ID. - **37** (string) - Server-assigned order ID. - **55** (string) - Symbol name. - **54** (string) - Side ('1' for buy, '2' for sell). - **38** (number) - Original order quantity. - **150** (string) - Reason for this message (ExecType). - **39** (string) - Order status. - **14** (number) - Quantity of order that has already been filled. - **151** (number) - Quantity of order that is still open. #### Response Example ```json { "35": "8", "11": "order123", "37": "123456", "55": "BTC_USDT", "54": "1", "38": 1.2, "150": "A", "39": "0", "14": 0.4, "151": 0.8 } ``` ``` -------------------------------- ### OrderCancelRequest (35=F) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Asynchronously cancels an existing order on the Exchange. ```APIDOC ## OrderCancelRequest (35=F) ### Description Cancels an existing order on the Exchange. This call is asynchronous; the response as ExecutionReport with Pending New is an acceptance of the request, not necessarily confirmation into the order book. ### Parameters #### Request Body - **Symbol** (string) - Required - e.g., ETH_CRO, BTC_USDT - **OrderID** (string) - Optional - Order ID assigned by the Exchange. - **ClOrdID** (string) - Required - Unique ID of cancel request. - **OrigClOrdID** (string) - Optional - ClOrdID of the previous non-rejected order. ### Response #### Success Response (200) - **MsgType** (string) - Must be 35=8 for pending cancel or 35=9 for cancel reject - **OrderID** (string) - Newly created order ID - **OrdStatus** (string) - 39=6 for an order cancel request being accepted - **ClOrdID** (string) - Unique identifier for Order - **OrigClOrdID** (string) - Original Unique identifier for Order - **ExecType** (string) - 150=6 for an order cancel request being accepted ``` -------------------------------- ### Security Definition API Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Provides details of a security instrument in response to a Security Definition Request. ```APIDOC ## GET /api/security/definition ### Description Retrieves the details of a security instrument. This message is sent as a response to a Security Definition Request (35=c). ### Method GET ### Endpoint /api/security/definition ### Parameters #### Query Parameters - **SecurityReqID** (String) - Required - The unique identifier of the request from 35=d. - **SecurityResponseID** (String) - Required - Identifier for the Security Definition message. - **SecurityResponseType** (String) - Required - Indicates acceptance of the security proposal. Valid values: 1 (Accept security proposal as is). - **Symbol** (String) - Required - The fully qualified product symbol. - **NoInstrAttrib** (Number) - Optional - Number of repeating InstrAttrib group entries. - **InstrAttribType** (Number) - Optional - Type of instrument attribute. Valid values: 1000 (Display name), 1001 (Base currency), 1002 (Quote currency), 1003 (Quantity Decimal), 1004 (Quote Decimal), 1005 (Price ticksize), 1006 (Quantity ticksize), 1007 (Max leverage), 1008 (Tradable), 1009 (Expiry timestamp ms), 1010 (Beta Product), 1011 (Margin Buy Enabled), 1012 (Margin Sell Enabled). - **InstrAttribValue** (String) - Optional - Value of instrument attribute, if applicable. ### Response #### Success Response (200) - **SecurityReqID** (String) - The unique identifier of the request. - **SecurityResponseID** (String) - Identifier for the Security Definition message. - **SecurityResponseType** (String) - Response type. Valid values: 1 (Accept security proposal as is). - **Symbol** (String) - The fully qualified product symbol. - **NoInstrAttrib** (Number) - Number of repeating InstrAttrib group entries. - **InstrAttribType** (Number) - Type of instrument attribute. - **InstrAttribValue** (String) - Value of instrument attribute. #### Response Example ```json { "SecurityReqID": "req123", "SecurityResponseID": "resp456", "SecurityResponseType": "1", "Symbol": "BTCUSDT", "NoInstrAttrib": 3, "InstrAttribType": [ 1000, 1001, 1005 ], "InstrAttribValue": [ "Bitcoin/TetherUS", "BTC", "0.01" ] } ``` ``` -------------------------------- ### Security List Request API Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Allows clients to request an aggregation of instrument definitions using a Security List Request (35=x) message. ```APIDOC ## POST /api/security/list/request ### Description Sends a Security List Request (35=x) to retrieve an aggregation of instrument definitions. Useful for obtaining all instrument definitions or a large number of them. ### Method POST ### Endpoint /api/security/list/request ### Parameters #### Request Body - **SecurityReqID** (String) - Required - The unique identifier of this request. - **SecurityListRequestType** (String) - Required - Type of security list request. Valid values: 0 (Symbol). - **SubscriptionRequestType** (Number) - Required - Type of subscription. Valid values: 0 (Snapshot), 1 (Snapshot and subscribe), 2 (Unsubscribe). ### Request Example ```json { "SecurityReqID": "listReq789", "SecurityListRequestType": "0", "SubscriptionRequestType": 1 } ``` ### Response #### Success Response (200) - **SecurityReqID** (String) - The unique identifier of the request. - **SecurityResponseID** (String) - Identifier for the Security List message. - **SecurityResponseType** (String) - Response type. Valid values: 1 (Accept security proposal as is). - **Symbol** (String) - The fully qualified product symbol. - **NoRelatedSym** (Number) - Number of related symbols. - **RelatedSym** (String) - Related symbol. #### Response Example ```json { "SecurityReqID": "listReq789", "SecurityResponseID": "listResp012", "SecurityResponseType": "1", "Symbol": "BTCUSDT", "NoRelatedSym": 1, "RelatedSym": "USDT" } ``` ``` -------------------------------- ### OrderMassCancelRequest (35=q) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Cancels all orders for a particular instrument or pair asynchronously. ```APIDOC ## POST OrderMassCancelRequest (35=q) ### Description Cancels all orders for a particular instrument/pair (asynchronous). This call is asynchronous, so the response as OrderMassCancelReport is simply an acceptance of the request. ### Parameters #### Request Body - **11** (string) - Required - Unique ID of Order Mass Cancel Request (q) as assigned by the client - **530** (number) - Required - Specifies the type of cancellation requested (1: Cancel by Symbol) - **55** (string) - Depends - The symbol for which to cancel all orders. Required when MassCancelRequestType=1 ``` -------------------------------- ### Heartbeat (35=0) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html The Heartbeat message monitors the status of the communication link. ```APIDOC ## Heartbeat (35=0) ### Description The Heartbeat (0) message monitors the status of the communication link and identifies when messages are not received within the HeartBtInt (108) interval. ### Parameters #### Request Body - **112** (string) - Optional - TestReqID: Identifier included in Test Request (1) to be returned in Heartbeat (0) ``` -------------------------------- ### Sequence Reset (35=4) Source: https://exchange-docs.crypto.com/spot/index-fix-f18-2a5a30f4-9177-4c97-aff6-923291d24255_v3.html Details on the Sequence Reset message, which supports Gap Fill and Reset modes to manage message sequence numbers. ```APIDOC ## Sequence Reset (35=4) ### Description The Sequence Reset message is used to adjust the expected sequence number. It operates in two modes: Gap Fill mode (used during resend processing) and Reset mode (used for disaster recovery). ### Parameters #### Request Body - **GapFillFlag** (boolean) - Optional - Indicates that the Sequence Reset message is replacing administrative or application messages which will not be resent. (Y = Gap Fill, N = Reset) - **NewSeqNo** (number) - Required - The new sequence number to be expected by the message recipient. ```