Skip to main content

Market order

GET /order/market

REQUIRE SIGN : Yes

This endpoint place a market order on the exchange used.

ExchangeAvailable
Binance Spot
Kraken Spot
Gate.IO Spot

Parameters

NameTypeMandatoryDescription
asset1StringYESFirst asset of the symbol. ex : "BTC" of "BTCUSDT"
asset2StringYESSecond asset of the symbol. ex : "USDT" of "BTCUSDT"
sideStringYESSide of the order. "BUY" or "SELL"
quantityFloat64YESQuantity of the order. ex : 0.1
quantityInStringYESQuantity in which asset. "asset1" or "asset2"

Request Example

curl -X POST 'https://api.exayn.com/v1/order/market' \
-H 'X-API-KEY: <PLACE YOUR PUBLIC KEY>' \
-H 'X-API-EXCHANGE-KEY: <PLACE YOUR EXCHANGE API KEY NAME>' \
-H 'Content-Type: application/json' \
-d '{
"asset1": "BTC",
"asset2": "ETH",
"side": "BUY",
"quantity": "0.1",
"quantityIn": "ETH",
"signature": "xxx"
}'

Response Example

{
"id": "60c9b4b0a9b3a0004a7f7b7f",
"asset1": "BTC",
"asset2": "ETH",
"status": "PENDING",
"type": "MARKET",
"side": "BUY",
"quantity": 0.1,
"quantityIn": "ETH",
"fees": 0.001, // Nullable
"feesIn": "ETH",
"openAt": 1623931200000,
"closeAt": 1623931200000
}