Create limit order
post
https://api.cryptomus.com/v2/user-api/convert/limit
Request
Query parameters
Name | Parameter type | Definition |
---|---|---|
from* | stringmax:10 | Currency to convert From |
to* | stringmax:10 | Currency to convert To |
amount* | string | Amount to be converted in currency fromIf there are pennies in the amount, then send them with a separator '.' Example: 10.28 |
price* | string | Price to convertIf there are pennies in the amount, then send them with a separator '.' Example: 10.28 |
Parameter type
stringmax:10Definition
Currency to convert FromParameter type
stringmax:10Definition
Currency to convert ToParameter type
stringDefinition
Amount to be converted in currency fromIf there are pennies in the amount, then send them with a separator '.'
Example: 10.28Parameter type
stringDefinition
Price to convertIf there are pennies in the amount, then send them with a separator '.'
Example: 10.28
* - mandatory parameter
Request example
curl https://api.cryptomus.com/v2/user-api/convert/limit \
-X POST \
-H 'userId: 8b03432e-385b-4670-8d06-064591096795' \
-H 'sign: fe99035f86fa436181717b302b95bacff1' \
-H 'Content-Type: application/json' \
-d '{
"from": "BTC",
"to": "USDT",
"amount": "0.0001",
"price": "70000"
}'
COPYResponse
Response parameters
Name | Definition |
---|---|
order_id | Id of convert |
convert_amount_from | Convert amount from |
convert_amount_to | Convert amount to |
executed_amount_to | Executed amount to |
executed_amount_from | Executed amount from |
convert_currency_from | Convert currency from |
convert_currency_to | Convert currency to |
type | Type enumAvailable options:• market• limit |
status | Status enumAvailable options:• active• completed• partially_completed• cancelled• expired• failed |
created_at | Date time create |
current_rate | Current rate |
limit | Limit value (only if type limit) |
expires_at | Limit expires date time |
completed_at | Date time when order completed (only if order completed) |
Definition
Id of convertDefinition
Convert amount fromDefinition
Convert amount toDefinition
Executed amount toDefinition
Executed amount fromDefinition
Convert currency fromDefinition
Convert currency toDefinition
Type enumAvailable options:- market- limitDefinition
Status enumAvailable options:- active- completed- partially_completed- cancelled- expired- failedDefinition
Date time createDefinition
Current rateDefinition
Limit value (only if type limit)Definition
Limit expires date timeDefinition
Date time when order completed (only if order completed)
Response example
1{
2 "state": 0,
3 "result": {
4 "order_id": "2d9bf426-98ef-448b-84c2-03cc1ec78feb",
5 "convert_amount_from": "10.000",
6 "convert_amount_to": "3.000",
7 "executed_amount_from": null,
8 "executed_amount_to": null,
9 "convert_currency_from": "USDT",
10 "convert_currency_to": "XMR",
11 "type": "market",
12 "status": "completed",
13 "created_at": "2024-07-11 , 18:06:04",
14 "current_rate": "100",
15 "completed_at": "2024-07-11 , 18:06:04"
16 }
17}
COPY