POST Trade

POST /trades

Sample Response

{
  "message": {
    "trade_id": "92616fce-31d3-465a-af01-0fb5d2dc4d40",
    "client_trade_id": "f2f14251-e296-42ac-9bc7-01c9186b9219",
    "session_id": "20190801000000",
    "trade_state": "terminated",
    "market_identifier_code": "TEST",
    "trade_reporter": "reporter@mail.com",
    "reporting_party": "SGC7CQ",
    "settlement_schedule": "ABCDEF",
    "symbol": "BTC/e₹",
    "trade_quantity": "1.0",
    "trade_price": "10000.000000",
    "trade_type": "regular",
    "physical_delivery": true,
    "comment": "Some comments about the trade for NDAX to store on blockchain",
    "settlement_timestamp": 1575849302321,
    "transaction_timestamp": 1575849302321,
    "accepted_timestamp": 1564686909724,
    "settled_timestamp": null,
    "defaulted_timestamp": null,
    "contract_size": 1,
    "bank_fee": "1.00",
    "underlying": "BTC",
    "quoted_currency": "e₹",
    "platform_code": "00TEST",
    "product_type": "spot",
    "parties_anonymous": true,
    "last_update": 1564686909724,
    "parties": [
      {
        "participant_code": "PKOHXY",
        "side": "buy",
        "asset": "BTC",
        "amount": "1.0",
        "liquidity_indicator": null,
        "execution_id": null,
        "order_id": null,
        "current_obligations_met_timestamp": 1564686909724,
        "obligations_outstanding_timestamp": 1564686909724,
        "client_order_id": null,
        "settling": true
      },
      {
        "participant_code": "S1I5ED",
        "side": "sell",
        "asset": "e₹",
        "amount": "4000.0000",
        "liquidity_indicator": null,
        "execution_id": null,
        "order_id": null,
        "current_obligations_met_timestamp": 1564686909724,
        "obligations_outstanding_timestamp": 1564686909724,
        "client_order_id": null,
        "settling": true
      }
    ]
  }
}

Allows a Trade Reporter to post executed spot trades to NDAX for settlement. The following fields are part of the submission.

ParameterDescriptionType

client_trade_id

A unique identifier for the trade, generally produced by the Platform on which the trade was executed Note: this must be unique, per platform, per 72 hour period

string

session_id

This field reflects the Session Period - A discrete period in time encompassing all trading for a platform. This could be as short as one minute or as long as one business day.

string

trade_reporter

A text field to indicate the name or identifier of the person or entity submitting the trade, e.g. an email address

string

reporting_party (optional)

The original reporter of the trade. This field is optional and must be a 6 digit participant code of which you have proper relationships with

string

settlement_schedule (optional)

Instructs NDAX to settle trades according to a certain schedule

string

platform_code

The unique identifier to the Platform on which the trade was executed, as provided by NDAX

string

market_identifier_code (optional)

The ISO 10383 market identifier code for the platform

string

symbol

A free text field to identify the pair being traded, e.g. BTC/e₹

string

product_type

spot or forward

string

trade_type

The type of trade to be settled Valid values are regular or block

string

trade_price

The price the trade was executed, refer to Note: if the amount is included per side, then this must equal to the seller's amount divided by the buyer's amount accurate for up to 20 figures

string

trade_quantity (conditional)

The quantity purchased Note: if the amount is included per side, then this should not be included, otherwise it is required

string

physical_delivery

A boolean statement to indicate if the trade is physically delivered Currently NDAX only supports physically-settled trades, i.e. a value of true

boolean

transaction_timestamp

The unix timestamp the trade was executed on the external platform in milliseconds

timestamp

comment (optional)

An optional field to use if there is any additional information needed

string

parties_anonymous

A boolean flag to determine if the counterparties are known to each other Must be false if the platform_code is also a counterparty to the trade

boolean

parties[]

The counterparties of the trade Currently NDAX only supports 2 parties per trade

array

settlement_price_index_id (conditional)

The unique identifier of the benchmark settlement price to be used when calculating settlement obligations on trades that are settled at NDAX - required for forwards only

string

settlement_timestamp (optional)

The datetime when final settlement will first be attempted - if not included, the standard platform settlement instructions will be applied

number (unix ms timestamp)

expiry_timestamp (optional)

The last datetime that the product can be traded, and the datetime that all final prices will be set, i.e. the fixing date - relevant for forwards only Note: after this point, there is no more ability to exit the trade or change its economics

number (unix ms timestamp)

bank_fee (optional)

An optional field that clients can use to specify the fee taken by the banking partner. This is used for reporting purposes only (supports 2 decimal places)

string

Parameters for a specific party to a trade.

ParameterDescriptionType

side

The side of the party, buy or sell

string

participant_code

The participant code as assigned by NDAX Note: this will be Anonymous for counterparties to the trade if the parties_anonymous boolean was flagged as true by the Trade Reporter

string

asset

The asset that is being received by the party

string

amount (conditional)

The amount of the asset that the party is receiving Note: if the trade_quantity is included, then this should not be included, otherwise it is required

string

liquidity_indicator (optional)

This an optional field that can be sent to mark whether the party added or removed liquidity upon execution, used for reporting purposes only

string

client_order_id (optional)

This is an optional field that may have been sent by your clients and can be sent as part of the request, used for reporting purposes only

string

order_id (optional)

This is an optional field that can be used to identify orders within your system, used for reporting purposes only

string

execution_id (optional)

This an optional field that can be used to identify the ID of the execution for orders, used for reporting purposes only

string

settling

This field states which side(s) will be settled

string

account_label (optional)

The account label to allocate the trade

string

As a response, all information provided in the trade submission will be returned, plus the following additional fields:

ParameterDescriptionType

trade_id

A unique ID from NDAX

string

trade_state

accepted, active, settled

string

accepted_timestamp

The timestamp when the trade was first accepted into NDAX with a trade_state of accepted

timestamp

current_obligations_met_timestamp

The most recent timestamp when the trade reached the settlement_state of current_obligations_met. Will be null if this has not occured yet

timestamp

obligations_outstanding_timestamp

The most recent timestamp when the trade reached the settlement_state of obligations_outstanding. Will be null if this has not occured yet

timestamp

settlement_state

null, obligations_oustanding, current_obligations_met, counterparty_defaulted, settled or defaulted

string

settled_timestamp

The timestamp when the trade fully settled all obligations, thereby reaching the terminal settlement_state of settled. Will be null if this has not occured yet

timestamp

defaulted_timestamp

The timestamp when the trade defaulted due to obligations not being met on time, thereby reaching the terminal settlement_state of defaulted. Will be null if this has not occured yet

timestamp

last_update

The timestamp that indicates the last time the trade was updated

timestamp

Trade Price

A trade_price with any precision is accepted, however note that final settlement amounts are limited to the asset’s currency precision limit. Further, when calculating trade notional and settlement values, NDAX utilizes banker's rounding. S

Quantity and Amount

There are 2 methods of submitting trade price, quantity and amount information to NDAX. Depending on your setup, one may be more appropriate than the other:

  1. Submit trade_price and trade_quantity and we will therefore calculate the amount that each side will receive, e.g. for a BTC/e₹ trade, you may submit a trade_price of 10,000 and a trade_quantity of 1. We would therefore calculate that the buyer receives 1 BTC and the seller receives $10,000. This model is useful for trading platforms that have more defined instruments.

  2. Submit trade_price and the amount field per side, which means you explicitly state the amount that each side receives, e.g. for a BTC/e₹ trade, you may submit a trade_price of 10,000 and an amount of 1 for the buy side an amount of 10000 for the sell side. This is useful for platforms that have lots of flexibility in the amounts and assets that are traded. Note: if the amount is included per side, then the trade_price must equal to the seller's amount divided by the buyer's amount, accurate for up to 20 figures.

Physical Delivery

This boolean determines if a product is physically or financially-settled.

  • true means that the instrument is settled physically and the underlying is actually delivered to the buyer.

  • false means that the instrument is settled financially and there is a payment of differences between the buyer and seller according to some agreed-upon index.

Parties Anonymous

The parties_anonymous field is used to protect counterparty information. In the event that a Trade Reporter wishes to keep the counterparty details anonymous, this flag can be set to true. This is relevant for brokers and other types of agency execution providers.

Trade State

  • accepted means the trade has been accepted by NDAX for settlement.

  • active means the trade is actively being settled.

  • terminated means the trade is in a terminal state, and has a settlement_state of either settled or defaulted.

Settlement State

  • null means the trade hasn't been attempted to be settled yet

  • obligations_outstanding means the trade has been accepted by NDAX, and settlement has been attempted. However settlement could not be completed so the trade has been rolled to the next settlement session.

  • current_obligations_met means all obligations have been met for the trade but has yet to be settled by NDAX

  • settled means the trade has fully settled.

  • defaulted means that the trade could not be settled by the expiry time, and so is deemed in default.

  • counterparty_defaulted means that the counterparty could not settle the trade by the expiry time.

Last updated