Trade Data API

Execute trades on exchanges through HTS

All the trade endpoints require a signature

Execute

Place spot order

Required input:

  • accountGuid: the guid of the account

  • primaryCoin : primary coin of the market.

  • secondaryCoin : secondary coin of the market.

  • price : the price on which the order is placed. Use 0 for market order.

  • amount : the amount of the order is the base currency.

  • timeout : order timeout in seconds (optional)

  • templateGuid : the guid of the template executed (optional).

  • userGuid : custom guid (optional)

Returns:

The executing template guid.

Example URL:

http://127.0.0.1:8050/PlaceSpotBuyOrder?accountGuid=43b1c5f8-31d4-45c0-9163-81b1443146b4&priceSourceName=Bittrex&primaryCoin=BTC&secondaryCoin=USDT&price=100&amount=1
http://127.0.0.1:8050/PlaceSpotSellOrder?accountGuid=43b1c5f8-31d4-45c0-9163-81b1443146b4&priceSourceName=Bittrex&primaryCoin=BTC&secondaryCoin=USDT&price=100&amount=1

Place margin/leverage order

Required input:

  • accountGuid : the guid of the account

  • primaryCoin : primary coin of the market.

  • secondaryCoin : secondary coin of the market.

  • contractName : contract name of the market

  • price : the price on which the order is placed. Use 0 for market order.

  • amount : the amount of the order is the base currency.

  • leverage : the leverage of the order.

  • timeout : order timeout in seconds (optional)

  • templateGuid : the guid of the template executed (optional).

  • userGuid : custom guid (optional)

Returns:

The executing template guid.

Example URL:

Cancel

Cancel template

Required input:

  • templateGuid : the guid of the template which is returned by the place order endpoint. This is not the same as the open order id in GetOpenOrders()

Returns:

A boolean indicating if the cancel is started.

Example URL:

Cancel order

Required input:

  • accountGuid : the account guid on which the order is active.

  • orderGuid : the order returned in GetOpenOrders()

Returns:

`EnumOrderStatus`

Example URL:

Status

Required input:

  • templateGuid : the guid of the template which is returned by the place order endpoint. This is not the same as the open order id in GetOpenOrders()

Returns:

`EnumOrderStatus`

Example URL:

Get Template Associated Order Guids

Required input:

  • templateGuid : the guid of the template which is returned by the place order endpoint. This is not the same as the open order id in GetOpenOrders()

Returns:

List with order guids

Example URL:

Get Template Associated Orders

Required input:

  • templateGuid : the guid of the template which is returned by the place order endpoint. This is not the same as the open order id in GetOpenOrders()

Returns:

List with orders

Example URL:

Last updated

Was this helpful?