Use this endpoint to submit Limit orders to be executed.
Currently, clients can request available asset pairs from their 1Konto representative. In the near future this information will also be available via API.
** ** nbbo price will always be better or equal to top of the book quotes
POST /api/v1/routing/account/{accountId}/order/limit
Path Parameters:
Path
Type
Description
accountId*
string
your account ID
Body Parameters:
Body
Type
Description
accountId *
object (ID)
type
string
type of order (limit)
source*
string
the asset you want to sell
destination*
string
the asset you want to buy
size*
string
the amount of source asset
limit
string
price limit for execution, expressed as Source/Destination. Example: BTC/USD -> $59000 USD.
endAt
string
Time when you want the order to cancel. YY-MM-DDTHH:MM:SEC.
Example 2019-08-24T14:15:22Z
Example
POST /api/v1/routing/account/yourAccountId/order/limit
// Error Response body
{
"status": 500,
"error": "Internal Server Error"
}
// Credit Limit - Error Responses
// outside of normal business hours when submitting order
{
"orderId": "theOrderIdXXXXXX",
"errors": [
"Credit Not Available: 10000 USDT credit requested can not be granted outside of normal business hours.",
],
"status": "failedDependency",
"httpStatusCode": 424
}
// when we have business hours but account credit available is not enough to fill the order
{
"orderId": "theOrderIdXXXXXX",
"errors": [
"Insufficient Funds: Requested 10000 USDT but only 1000 USDT is available"
],
"status": "failedDependency",
"httpStatusCode": 424
}
// global credit is not available , or , credit limit not available for destination asset
{
"orderId": "theOrderIdXXXXXX",
"errors": [
"Credit Not Available: Your account is in good standing, but credit is not available at this time. Please contact your account executive."
],
"status": "failedDependency",
"httpStatusCode": 424
}