リミットオーダーを作成する

post
https://api.cryptomus.com/v2/user-api/convert/limit
コピー

リクエスト

クエリパラメーター

名前パラメータータイプ意味
from*stringmax:10変換元の通貨
to*stringmax:10変換先の通貨
amount*string変換する金額(元通貨)金額にペニーがある場合は、「セパレーター」で送ってください。
例:10.28
price*string変換する価格金額にペニーがある場合は、「セパレーター」で送ってください。
例:10.28

パラメータータイプ

stringmax:10

意味

変換元の通貨

パラメータータイプ

stringmax:10

意味

変換先の通貨

パラメータータイプ

string

意味

変換する金額(元通貨)金額にペニーがある場合は、「セパレーター」で送ってください。
例:10.28

パラメータータイプ

string

意味

変換する価格金額にペニーがある場合は、「セパレーター」で送ってください。
例:10.28

* - 必須パラメーター

リクエスト例

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"
    }'
コピー

応答

応答パラメーター

名前意味
order_id変換ID
convert_amount_from変換元の金額
convert_amount_to変換先の金額
executed_amount_to実行された金額(先)
executed_amount_from実行された金額(元)
convert_currency_from変換通貨元
convert_currency_to変換通貨先
type列挙型利用可能なオプション:marketlimit
status状態列挙型利用可能なオプション:activecompletedpartially_completedcancelledexpiredfailed
created_at作成日時
current_rate現在のレート
limit限度額(タイプが「限度」の場合のみ)
expires_at限度の有効期限
completed_at注文完了日時(注文が完了した場合のみ)

意味

変換ID

意味

変換元の金額

意味

変換先の金額

意味

実行された金額(先)

意味

実行された金額(元)

意味

変換通貨元

意味

変換通貨先

意味

列挙型利用可能なオプション:- market- limit

意味

状態列挙型利用可能なオプション:- active- completed- partially_completed- cancelled- expired- failed

意味

作成日時

意味

現在のレート

意味

限度額(タイプが「限度」の場合のみ)

意味

限度の有効期限

意味

注文完了日時(注文が完了した場合のみ)

応答の例


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}
コピー