Skip to main content

Spot Trading

Spot trading refers to a direct purchase or sale of crypto at the current market price with the aim of generating a trading profit . As the name suggests, the trade is happening on the spot. In spot trading, the delivery of tokens will be almost instantaneous.

Below are some of the key terms regarding Spot trading,

TermExplanation
Spot PriceSpot Price refers to the current market price of the asset. In Crypto, the Spot price fluctuates a lot based on the market conditions
Trade DateTrade date refers to the date on which the trade took place.
Settlement DateSettlement date refers to the date on which the transacted assets were actually transferred.

The biggest advantage of Spot trading is it is simple and easy to understand. It is a good place to start in the crypto market.

The CoinDCX API provides the following functionalities for Creating and Managing Spot Orders.

  • Placing new Orders
  • Cancelling an Order
  • Exiting an Order
  • Editing an Order
  • Getting data for orders placed

To know more about how to place spot orders using the CoinDCX API, refer to the API Documentation..

First Spot Order on CoinDCX API

  1. The following endpoints can be used to place your first order:
https://api.coindcx.com/exchange/v1/orders/create
  1. Specify the following details in the body of your code:
ParameterRequiredDescription
keyYesYou can access the API key on your API Dashboard. To know the process for creating an API Key, refer to this document.
secretYesYou can generate the secret on the API Dashboard. To know the process for same, refer to this document.
marketYesIndicates the pair for which the order is being placed.
total_quantityYesThe quantity of the asset to be traded.
price_per_unitYesPrice of the asset per unit.
sideYesIndicates the side for which you are placing the order. Acceptable values are:
  • Buy
  • Sell
order_typeYesIndicates the order type. The following order types can be used:
  • market_order
  • limit_order
  • stop_limit
  • take_profit
  1. If your order is placed successfully, you will receive the following response:
{
"orders":[
{
"id":"ead19992-43fd-11e8-b027-bb815bcb14ed",
"client_order_id": "2022.02.14-btcinr_1",
"market":"TRXETH",
"order_type":"limit_order",
"side":"buy",
"status":"open",
"fee_amount":0.0000008,
"fee":0.1,
"total_quantity":2,
"remaining_quantity":2.0,
"avg_price":0.0,
"price_per_unit":0.00001567,
"created_at":"2018-04-19T18:17:28.022Z",
"updated_at":"2018-04-19T18:17:28.022Z"
}
]
}
  1. You can use the id parameter in the response to,
  • Edit Order Details
  • Cancel an Order
  • Retrieve data for an order

To know more about specific endpoints for these, refer to the API Documentation.