Signature Examples
Now, let's build a couple signatures for your requests. For demonstrational purposes, we'll be using constant values for private-key
and timeframe
.
Private Key
private-key
Timestamp
1677486443
Basic Crypto Operations
POST /merchants/addresses
Whole body of the request should also be included in the MESSAGE as payload.
Request: POST/merchants/addresses
Body: {"blockchain":"BITCOIN", "meta":"your-info"}
Message: POST/merchants/addresses{"blockchain":"BITCOIN", "meta":"your-info"}1677486443
Signature: d1aeccfe32e4adf499be5777f38cd643a2a2c06a929f1f328d9809b9f8f8509e
POST /merchants/rotating-addresses
Whole body of the request should also be included in the MESSAGE as payload.
Request: POST/merchants/rotating-addresses
Body: POST/merchants/rotating-addresses{"blockchain":"BITCOIN", "meta":"your-info", "duration":"123145513"}
Message: POST/merchants/rotating-addresses{"blockchain":"BITCOIN", "meta":"your-info", "duration":"123145513"}1677486443
Signature: 2b3cb49ec7e03f7b53df43aea92977ef22d2ed5e8fff4ecd0696bf3906c070ea
POST /merchants/withdrawals/crypto
Whole body of the request should also be included in the MESSAGE as payload.
Request: POST/merchants/withdrawals/crypto
Body: {"ticker":"USDT", "blockchain":"TRON", "to":"THPvaUhoh2Qn2y9THCZML3H815hhFhn5YCw", "amount":"12.000", "meta":"your-info"}
Message: POST/merchants/withdrawals/crypto{"ticker":"USDT", "blockchain":"TRON", "to":"THPvaUhoh2Qn2y9THCZML3H815hhFhn5YCw", "amount":"12.000", "meta":"your-info"}1677486443
Signature: 47e1044d1116fae66dafa5af595170b7b2a63d5c169e8c030a0787b6b8095a23
GET /withdrawals/crypto/fee?ticker=USDT&amount=12.00&blockchain=TRON
Since this request sends parameters via query, they have to be included in the final MESSAGE.
Request: GET/withdrawals/crypto/fee
Query: ?ticker=USDT&amount=12.00&blockchain=TRON
Message: GET/merchants/withdrawals/crypto/fee?ticker=USDT&amount=12.00&blockchain=TRON1677486443
Signature: 80024504f409906c1bc9359bb943847eed0c9f8f5bfe83b9b5f5c8155e44e404
GET /merchants/assets/crypto
Since there're no parameters, MESSAGE will look like this:
Request: GET/merchants/assets/crypto
Message: GET/merchants/assets/crypto1677486443
Signature: a6351a236ac09284b9c31c1037a1b75541c2ca98b6ad2680f26bb4bb93c25751
Crypto Invoices
POST /merchants/invoices/crypto
Whole body of the request should also be included in the MESSAGE as payload.
Request: POST/merchants/invoices/crypto
Body: {"name":"Order #123123-412d-asdw", "amount":{"value":"125", "ticker":"USDT", "blockchain":"TRON"}, "meta":"your-info"}
Message: POST/merchants/invoices/crypto{"name":"Order #123123-412d-asdw", "amount":{"value":"125", "ticker":"USDT", "blockchain":"TRON"}, "meta":"your-info"}1677486443
Signature: f81f47f01e162a0fe0344e7b3f8ab874004984e440893728657e4e0ae1509ca4
GET /merchants/invoices/crypto/:id
Parameter id
is included in URL path, and thus will be included into MESSAGE as payload. Let's pretend that id is "1234455-asdfafg-asdaweqw"
Request: GET/merchants/invoices/crypto/1234455-asdfafg-asdaweqw
Message: GET/merchants/invoices/crypto/1234455-asdfafg-asdaweqw1677486443
Signature: 6a27ef229d9be45a0a45914198ed042abd0fe9293db4b0de1ef322e50a7f5e8f
Fiat Invoices
GET /merchants/invoices/fiat/:id
Parameter id
is included in URL path, and thus will be included into MESSAGE as payload. Let's pretend that id is "1234455-asdfafg-asdaweqw"
Request: GET/merchants/invoices/fiat/1234455-asdfafg-asdaweqw
Message: GET/merchants/invoices/fiat/1234455-asdfafg-asdaweqw1677486443
Signature: 6599f0657438824f6febdfca4f2dd8f4e00ec3a92dc2c6f713b3616dea11e64f
Basic Fiat Operations
GET /merchants/assets/fiat
Since there're no parameters, MESSAGE will look like this:
Request: GET/merchants/assets/fiat
Message: GET/merchants/assets/fiat1677486443
Signature: 95b15332d483b522789ce68790900aa6f22ddcce134bd876119ec2a10b6637d3
GET /merchants/withdrawals/fiat/batch/:id
Parameter id
is included in URL path, and thus will be included into MESSAGE as payload. Let's pretend that id is "1234455-asdfafg-asdaweqw"
Request: GET/merchants/withdrawals/fiat/batch/1234455-asdfafg-asdaweqw
Message: GET/merchants/withdrawals/fiat/batch/1234455-asdfafg-asdaweqw1677486443
Signature: f02dbe7edc1541f5acd0102502cb6052a67028be89124a35a0f98a05e28ba39f
Exchange/Exchange + Withdrawal
GET /merchants/exchange/available-directions
Request: GET/merchants/exchange/available-directions
Message: GET/merchants/exchange/available-directions1677486443
Signature: 99aedc6f6e90cfcd6b9b7978dfcb58faf41780db6da8f6dbd5f8cd9b6428917e
Last updated