Note
|
Those routes require the feature pairs to be enabled for the requested exchange {
"features":{
"pairs":{
"enabled":true
}
}
} |
This routes can be used to ensure that an order will match exchange filters such as :
-
minimum rate & precision
-
minimum quantity & precision
-
minimum price (ie: quantity * rate)
GET /exchanges/{exchangeId}/testOrder
Note
|
Query parameters can be sent in one of the following format :
|
Name | Type | Description |
---|---|---|
pair |
string |
Pair (X-Y) |
orderType |
string (buy,sell) |
Order type to create |
targetRate |
float |
Expected per-unit price for the trades |
Note
|
One of the following optional parameter must be defined :
|
Name | Type | Default | Description |
---|---|---|---|
quantity |
float |
Quantity to buy/sell |
|
targetPrice |
float |
quantity * targetRate (will be ignored if quantity is set) |
|
finalPrice |
float |
quantity * targetRate +- fees (will be ignored if quantity or targetPrice is set) |
|
feesPercent |
float |
default value for the exchange |
% fees to use when computing final price (0-100) |
Result will be a dictionary such as below
Name | Type | Description |
---|---|---|
orderType |
string (buy,sell) |
Requested order type |
pair |
string |
Requested pair (X-Y) |
targetRate |
float |
Updated target rate matching exchange filters |
quantity |
float |
Updated quantity matching exchange filters |
targetPrice |
float |
quantity * targetRate |
fees |
float |
Estimated fees in base currency |
finalPrice |
float |
quantity * targetRate +- fees |
Example for GET /exchanges/binance/testOrder?orderType=sell&pair=USDT-NEO&targetRate=150.0555&finalPrice=1500
{
"orderType":"sell",
"pair":"USDT-NEO",
"targetRate":150.055,
"quantity":10.006,
"targetPrice":1501.45033,
"fees":1.50145033,
"finalPrice":1499.94887967
}
Note
|
In above example :
|