Skip to navigation

Place grid algo order

Create a spot grid, contract grid or moon grid algo order for automated grid trading within a defined price range.

Authentication

OK-ACCESS-KEYstring
Your API key.
OK-ACCESS-SIGNstring

Base64-encoded HMAC-SHA256 signature of the prehash string.

OK-ACCESS-TIMESTAMPstring

ISO 8601 UTC timestamp, e.g. 2020-12-08T09:08:57.715Z.

OK-ACCESS-PASSPHRASEstring
The passphrase you set when creating the API key.

Request

This endpoint expects an object.
instIdstringRequired

Instrument ID, e.g. BTC-USDT-SWAP

algoOrdTypeenumRequired

Algo order type grid: Spot grid contract_grid: Contract grid

Allowed values:
maxPxstringRequired
Upper price of price range
minPxstringRequired
Lower price of price range
gridNumstringRequired
Grid quantity
runTypeenumRequired

Grid type 1: Arithmetic, 2: Geometric Default is Arithmetic

Allowed values:
tpTriggerPxstringOptional

TP tigger price Applicable to Spot grid/Contract grid

slTriggerPxstringOptional

SL tigger price Applicable to Spot grid/Contract grid

tagstringOptional
Order tag
quoteSzstringOptional

Invest amount for quote currency Either quoteSz or baseSz is required

baseSzstringOptional

Invest amount for base currency Either quoteSz or baseSz is required

szstringOptional

Used margin based on USDT

directionenumOptional

Contract grid type long,short,neutral

Allowed values:
leverstringOptional
Leverage
basePosbooleanOptional

Whether or not open a position when the strategy activates Default is false Neutral contract grid should omit the parameter

tpRatiostringOptional

Take profit ratio, 0.1 represents 10%

slRatiostringOptional

Stop loss ratio, 0.1 represents 10%

tradeQuoteCcystringOptional

The quote currency for trading. Only applicable to SPOT. The default value is the quote currency of instId, e.g. USD for BTC-USD.

triggerParamslist of objectsOptional

Trigger Parameters Applicable to Spot grid/Contract grid

Response

Successful response
codestringOptional

Result code. 0 means success; any other value is an error code.

msgstringOptional
Error message. Empty on success.
datalist of objectsOptional