Skip to main content

Mass sending

Mass sending allows the User to create and send 2 or more withdrawals at a time, in the same currency, to different wallets. For the User this looks like one transaction, for XAMAX it is many single transactions completed at one time.

Creating mass sending transaction ​

API requests to single withdrawal and mass sending has only one difference.
At mass sending request adding a few destination wallets and amounts.

Request​

POST https://api.xamax.io/v1/withdrawal HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"fromAddress": [
"string"
],
"code": "string",
"destination": [
{
"address": "string",
"amount": "string",
"behavior": "fee_from_rest_amount"
},
{
"address": "string",
"amount": "string",
"behavior": "fee_from_rest_amount"
}
]
}
ParameterTypeDescriptionDefault valueExample
fromAddress *stringList of merchants wallet addresses with status waiting. Wallets must be of one code and one merchantn1FgCvGuVKznM8ezByK8AdysqYwPCF8XKC 2NFABrcHC2pKwuPRhdfEQVtdicw4jTi1PEy
codestringCrypto codeusdt
destinationarrayList of addresses and amounts
address *stringDestination addressn1FgCvGuVKznM8ezByK8AdysqYwPCF8XKC 2NFABrcHC2pKwuPRhdfEQVtdicw4jTi1PEy
amount *stringAmount for withdraw. Empty if strategy = withdraw_all100000000000
behavior *stringWorking only with XAMAX wallet. Default: fee_from_rest_amountfee_from_rest_amountfee_from_rest_amount
* - Required parameter

Example​

Request

POST https://api.xamax.io/v1/withdrawal HTTP/1.1
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json

{
"fromAddress": [
"0x98c7320928aA5358e29F21364CbAa3ab97a3a9AC"
],
"code": "usdt",
"destination": [
{
"address": "0xba783696FEcB5E964a0716B6f5917C8bB1935a7b",
"amount": "1000000",
"behavior": "fee_from_rest_amount"
},
{
"address": "0x98c7320928aA5358e29F21364CbAb3ab97a3a9AC",
"amount": "1000000",
"behavior": "fee_from_rest_amount"
}
]
}

Response body

{
"withdrawals": [
{
"withdrawalAddresses": [
{
"address": "0xba783696FEcB5E964a0716B6f5917C8bB1935a7b",
"amount": "1000000",
"amountUnit": "1.00",
"code": "usdt",
"exchangeRate": {
"currency": "usd",
"exchangeRate": 1,
"currencyAmount": 1,
"code": "usdt"
}
}
],
"txHash": "0x7c5b1746db0eed98f3f7f7d5b839950069a710e2e0fa25fa187c69f229f3870e",
"fee": "207856831777650",
"feeCurrency": "eth",
"feeUnit": "0.00020785683177765",
"currency": "usdt",
"feeExchangeRate": {
"currency": "usd",
"exchangeRate": 1900,
"currencyAmount": 0.394927980377535,
"code": "eth"
},
"exchange": null,
"processingAdditionalCost": null
},
{
"withdrawalAddresses": [
{
"address": "0x98c7320928aA5358e29F21364CbAb3ab97a3a9AC",
"amount": "1000000",
"amountUnit": "1.00",
"code": "usdt",
"exchangeRate": {
"currency": "usd",
"exchangeRate": 1,
"currencyAmount": 1,
"code": "usdt"
}
}
],
"txHash": "0xea8f6998aaa0608bd97cea0250e04b024d619228bbbcd56f36ac51add62dedba",
"fee": "207856831777650",
"feeCurrency": "eth",
"feeUnit": "0.00020785683177765",
"currency": "usdt",
"feeExchangeRate": {
"currency": "usd",
"exchangeRate": 1900,
"currencyAmount": 0.394927980377535,
"code": "eth"
},
"exchange": null,
"processingAdditionalCost": null
}
],
"total": {
"fee": {
"amount": "415713663555300",
"amountUnit": "0.0004157136635553",
"currency": "eth"
},
"processingAdditionalCost": {
"amount": "0",
"amountUnit": "",
"currency": ""
}
}
}