Whitelisted withdrawal addresses
Use these methods to get the data about the withdrawal addresses that clients added to their whitelists.
If the address management option is enabled for a client, the client can make withdrawals only to the whitelisted addresses. If disabled, the client can withdraw funds to any wallet address.
GET[host]/api/v2/my/withdrawals/policies |
|
GET[host]/api/v2/my/withdrawals/policies/{policyId} |
|
GET[host]/api/v2/my/withdrawals/policies/currencies |
Get a list of currencies for withdrawing funds to whitelisted withdrawal addresses |
Use these methods to add withdrawal addresses to a client whitelist.
GET[host]/api/v2/my/withdrawals/policies/wizard |
Initialize the wizard for creating a withdrawal address whitelist |
POST[host]/api/v2/my/withdrawals/policies |
Use these methods to remove withdrawal addresses from a client whitelist.
GET[host]/api/v2/my/withdrawals/policies/delete/wizard |
Initialize the wizard for removing a withdrawal address from a whitelist |
DELETE[host]/api/v2/my/withdrawals/policies/{policyId} |
Use these methods to enable or disable the address management option for a client.
PUT[host]/api/v2/my/withdrawals/policies/enable PATCH[host]/api/v2/my/withdrawals/policies/enable |
|
GET[host]/api/v2/my/withdrawals/policies/disable/wizard |
Initialize the wizard for disabling the address management option |
PUT[host]/api/v2/my/withdrawals/policies/disable PATCH[host]/api/v2/my/withdrawals/policies/disable |
Use this method to confirm the procedures initialized for making changes to withdrawal address whitelists.
POST[host]/api/v2/my/withdrawals/policies/confirm |
Get a list of whitelisted withdrawal addresses
Use this method to obtain a list of withdrawal addresses added to client whitelists.
To obtain detailed information about a specific whitelisted withdrawal address, use a separate method to get whitelisted address details.
Request
Header parameters:
Authorization: Bearer <access_token>
Query parameters:
The following filter parameters are available for this method:
- clientId
The client identifier.
- walletAddress
A string value identifying the address of a wallet that is used for withdrawing funds.
- currencyCode
The numeric code of the currency in which a wallet for withdrawing funds is denominated.
The following sorting parameter is available for this method:
- walletAddress
A string value identifying the address of a wallet that is used for withdrawing funds.
Refer to the Query parameters section in the API Overview for details on applying filter and sorting parameters.
GET[host]/api/v2/my/withdrawals/policies
curl --location -g 'https://host.nameg/api/v2/my/withdrawals/policies?limit=10&offset=0&sort_by=walletAddress&filter[clientId]=1&filter[walletAddress]=3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLi&filter[currencyCode]=1000' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response contains an array of Whitelisted Address objects providing information about the whitelisted addresses matching the request parameters.
Get whitelisted withdrawal address details
Use this method to obtain detailed information about a specified withdrawal address added to a client whitelist.
To obtain a list of withdrawal addresses added to client whitelists, use a separate method to get whitelisted addresses.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- policyId required
The identifier of a whitelisted withdrawal address.
GET[host]/api/v2/my/withdrawals/policies/{policyId}
curl --location -g 'https://host.name/api/v2/my/withdrawals/policies/1' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response contains a Whitelisted Address object providing information about the specified whitelisted address.
Get a list of currencies for withdrawing funds to whitelisted withdrawal addresses
Use this method to obtain a list of the currencies in which clients can withdraw funds to their whitelisted withdrawal addresses.
Request
Header parameters:
Authorization: Bearer <access_token>
GET[host]/api/v2/my/withdrawals/policies/currencies
curl --location -g 'https://host.name/api/v2/my/withdrawals/policies/currencies' \
--header 'Authorization: Bearer <token>'
Response
A response contains an array of Currency objects providing information about the currencies in which clients can withdraw funds to their whitelisted withdrawal addresses.
Initialize the wizard for creating a withdrawal address whitelist
Use this method to initialize the procedure of creating a withdrawal address whitelist for the currently authenticated client.
Request
Header parameters:
Authorization: Bearer <access_token>
GET[host]/api/v2/my/withdrawals/policies/wizard
curl --location -g 'https://host.name/api/v2/my/withdrawals/policies/wizard' \
--header 'Authorization: Bearer <token>'
Response
- code integer
An HTTP code specifying the current step in a progression of wizard pages:
HTTP code
200
for an intermediary step after which another page of the form used to create a withdrawal address whitelist is displayed to a clientHTTP code
202
for a final wizard step signaling that a whitelist was successfully created
- data object or null
Always
null
for this wizard type.- done boolean
If
true
, a withdrawal address whitelist was created for a client; otherwise,false
.- uuid string
The universally unique identifier (UUID) assigned to a procedure of creating a withdrawal address whitelist.
- workflow string
A string value indicating the next step of a procedure of creating a withdrawal address whitelist.
The
make_wallet_whitelist
value indicates that withdrawal addresses can be added to the whitelist.
{
"code": 200,
"data": null,
"done": false,
"uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",
"workflow": "make_wallet_whitelist"
}
Add a withdrawal address to a whitelist
After initializing the wizard for creating a withdrawal address whitelist, use this method to add withdrawal addresses to the whitelist.
Request
Header parameters:
Authorization: Bearer <access_token>
Body:
Specify the following parameters when adding a withdrawal address to a whitelist:
- uuid string required
The universally unique identifier (UUID) obtained after initializing the wizard for creating a withdrawal address whitelist.
- walletAddress string required
A string value identifying the address of a wallet that you want to add to a whitelist.
- currencyCode integer required
The numeric code of the currency in which a wallet for withdrawing funds is denominated.
- noDestinationTag boolean required
If
true
, a destination tag used to identify a transaction recipient is not required; otherwise,false
.- destinationTag string or null
If noDestinationTag is set to
false
, specify the destination tag that is required to identify a transaction recipient when withdrawing funds to a specified wallet address.
POST[host]/api/v2/my/withdrawals/policies
curl --location --request POST 'https://host.name/api/v2/my/withdrawals/policies' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",
"walletAddress": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLi",
"currencyCode": 1000,
"noDestinationTag": true,
}'
Response
- code integer
An HTTP code specifying the current step in a progression of wizard pages:
HTTP code
200
for an intermediary step after which another page of the form used to add a withdrawal address to a whitelist is displayed to a clientHTTP code
202
for a final wizard step signaling that a withdrawal address was successfully added to a whitelist
- data object
The details about the verification code required to confirm a procedure of adding a withdrawal address to a whitelist.
Show object fields- expiredAt string
The date and time when a verification code is due to expire.
- sentAt string
The date and time when a verification code was sent to a client email address.
- recipient object
The details about a verification code recipient.
- done boolean
If
true
, a withdrawal address was successfully added to a whitelist; otherwise,false
.- uuid string
The universally unique identifier (UUID) assigned to a procedure of adding a withdrawal address to a whitelist.
- workflow string
A string value indicating the next step of a procedure of adding a withdrawal address to a whitelist. Possible values:
email
orphone
— indicates that confirmation with the verification code sent to a client email address or phone number is required. Next, use the method to confirm the initialized procedure.add_wallet_whitelist
— indicates that no confirmation is required; the specified wallet address was added to a whitelist.
{
"code": 200,
"data": {
"status": 0,
"sent": 1,
"expiredAt": "2022-01-01T00:00:00+00:00",
"sentAt": "2022-01-01T00:00:00+00:00",
"recipient": {
"class": "B2B\\TCA\\Confirmations\\Recipients\\EmailRecipient",
"template": "Withdraw_whitelistConfirm",
"email": "jdow@example.com",
"name": "John Doe",
"url": "",
"method": "email"
}
},
"done": false,
"uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",
"workflow": "email"
}
Initialize the wizard for removing a withdrawal address from a whitelist
Use this method to initialize the procedure of removing a withdrawal address from a client whitelist.
Request
Header parameters:
Authorization: Bearer <access_token>
GET[host]/api/v2/my/withdrawals/policies/delete/wizard
curl --location --request GET 'https://host.name/api/v2/my/withdrawals/policies/delete/wizard' \
--header 'Authorization: Bearer <token>'
Response
- code integer
An HTTP code specifying the current step in a progression of wizard pages:
HTTP code
200
for an intermediary step after which another page of the form used to remove a withdrawal address from a whitelist is displayed to a clientHTTP code
202
for a final wizard step signaling that a withdrawal address was successfully removed from a whitelist
- data object or null
The details about the verification code required to confirm a procedure of removing a withdrawal address from a whitelist.
Show object fields- expiredAt string
The date and time when a verification code is due to expire.
- sentAt string
The date and time when a verification code was sent to a client email address.
- recipient object
The details about a verification code recipient.
- done boolean
If
true
, a withdrawal address was successfully removed from a whitelist; otherwise,false
.- uuid string
The universally unique identifier (UUID) assigned to a procedure of removing a withdrawal address from a whitelist.
- workflow string
A string value indicating the next step of a procedure of removing a withdrawal address from a whitelist. Possible values:
email
orphone
— indicates that confirmation with the verification code sent to a client email address or phone number is required. Next, use the method to confirm the initialized procedure.delete_wallet_whitelist
— indicates that no confirmation is required. Next, use the method to remove a withdrawal address from a whitelist.
{
"code": 200,
"data": {
"status": 0,
"sent": 1,
"expiredAt": "2022-01-01T00:00:00+00:00",
"sentAt": "2022-01-01T00:00:00+00:00",
"recipient": {
"class": "B2B\\TCA\\Confirmations\\Recipients\\EmailRecipient",
"template": "Withdraw_whitelistConfirm",
"email": "jdow@example.com",
"name": "John Doe",
"url": "",
"method": "email"
}
},
"done": false,
"uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",
"workflow": "email"
}
Remove a withdrawal address from a whitelist
After initializing the wizard for removing a withdrawal address from a client whitelist, use this method to remove a specified withdrawal addresses from the whitelist.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- policyId required
The identifier of a withdrawal address that you want to remove from a whitelist.
DELETE[host]/api/v2/my/withdrawals/policies/{policyId}
curl --location --request DELETE 'https://host.name/api/v2/my/withdrawals/policies/1' \
--header 'Authorization: Bearer <token>'
Response
In case of success, no response body is returned.
Enable the address management option
Use this method to enable the address management option for the currently authenticated client.
After enabling this option, the client can withdraw funds only to the whitelisted withdrawal addresses.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <access_token>
PUT[host]/api/v2/my/withdrawals/policies/enable
curl --location --request PUT 'https://host.name/api/v2/my/withdrawals/policies/enable' \
--header 'Authorization: Bearer <token>'
Response
In case of success, no response body is returned.
Initialize the wizard for disabling the address management option
Use this method to initialize the procedure of disabling the address management option for the currently authenticated client.
After disabling this option, the client can withdraw funds to any wallet address.
Request
Header parameters:
Authorization: Bearer <access_token>
GET[host]/api/v2/my/withdrawals/policies/disable/wizard
curl --location -g 'https://host.name/api/v2/my/withdrawals/policies/disable/wizard' \
--header 'Authorization: Bearer <token>'
Response
- code integer
An HTTP code specifying the current step in a progression of wizard pages:
HTTP code
200
for an intermediary step after which another page of the form used to disable the address management option is displayed to a clientHTTP code
202
for a final wizard step signaling that the address management option was successfully disabled
- data object or null
The details about the verification code required to confirm a procedure of disabling the address management option.
Show object fields- expiredAt string
The date and time when a verification code is due to expire.
- sentAt string
The date and time when a verification code was sent to a client email address.
- recipient object
The details about a verification code recipient.
- done boolean
If
true
, the address management option was successfully disabled; otherwise,false
.- uuid string
The universally unique identifier (UUID) assigned to a procedure of disabling the address management option.
- workflow string
A string value indicating the next step of a procedure of disabling the address management option. Possible values:
email
orphone
— indicates that confirmation with the verification code sent to a client email address or phone number is required. Next, use the method to confirm the initialized procedure.disable_wallet_whitelist
— indicates that no confirmation is required. Next, use the method to disable the address management option.
{
"code": 200,
"data": {
"status": 0,
"sent": 1,
"expiredAt": "2022-01-01T00:00:00+00:00",
"sentAt": "2022-01-01T00:00:00+00:00",
"recipient": {
"class": "B2B\\TCA\\Confirmations\\Recipients\\EmailRecipient",
"template": "Withdraw_whitelistConfirm",
"email": "jdow@example.com",
"name": "John Doe",
"url": "",
"method": "email"
}
},
"done": false,
"uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",
"workflow": "email"
}
Disable the address management option
After initializing the wizard for disabling the address management option, use this method to disable this option for a client.
After disabling this option, the client can withdraw funds to any wallet address.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <access_token>
Body:
- uuid string required
The universally unique identifier (UUID) obtained after initializing the wizard for disabling the address management option.
PUT[host]/api/v2/my/withdrawals/policies/disable
curl --location --request PUT 'https://host.name/api/v2/my/withdrawals/policies/disable' \
--header 'Authorization: Bearer <token>'
--data-raw '{
"uuid": "36f59381-5b54-48bd-a0c7-3b908c476732"
}'
Response
In case of success, no response body is returned.
Confirm an initialized procedure
To be able to customize client address whitelists, use this method to confirm the following procedures after they are initialized:
add withdrawal addresses to a whitelist
remove withdrawal addresses from a whitelist
disable the address management option for a client
Confirmation with verification codes sent to a client is required if the wizards that define procedure workflows include the confirmation step.
Request
Header parameters:
Authorization: Bearer <access_token>
Body:
- uuid string required
The universally unique identifier (UUID) obtained after initializing a corresponding wizard.
- code integer required
The verification code sent to a client email address or phone number.
POST[host]/api/v2/my/withdrawals/policies/confirm
curl --location --request POST 'https://host.name/api/v2/my/withdrawals/policies/confirm' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"uuid": "36f59381-5b54-48bd-a0c7-3b908c476732",
"code": "99040"
}'
Response
The response returned after confirming the procedure of adding a withdrawal address to a client whitelist includes the following data:
- code integer
An HTTP code specifying the current step in a progression of wizard pages:
HTTP code
200
for an intermediary step after which another page of the form used to add a withdrawal address to the whitelist is displayed to a clientHTTP code
202
for a final wizard step signaling that a withdrawal address was successfully added to the whitelist
- data object
The details about the withdrawal address that was added to a client whitelist. See the Whitelisted Addresses object to learn more.
- done boolean
If
true
, a withdrawal address was successfully added to a whitelist; otherwise,false
.- uuid string
The universally unique identifier (UUID) assigned to a procedure of adding a withdrawal address to the whitelist.
- workflow string
A string value indicating the next step of a procedure of adding a withdrawal address to the whitelist.
{
"code": 202,
"data":
{
"id": 1,
"destinationTag": null,
"walletAddress": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLi",
"client": {
"clientId": 1,
"birthday": "2022-01-01T00:00:00+00:00",
"country": {
"countryId": 8,
"alpha2Code": "US",
"alpha3Code": "USA",
"countryName": "United States",
"callingCode": "+1",
"numericCode": "840",
"enabled": true
},
"email": "jdoe@bexample.com",
"locale": "en_US",
"name": "John Doe",
"nickname": "Super trader",
"phone": "+995577755422"
},
"currency": {
"alphabeticCode": "BTC",
"minorUnit": 8,
"name": "Bitcoin",
"numericCode": 1000
},
"isEnabled": true,
"createTime": "2022-01-01T00:00:00+00:00",
"updateTime": "2022-01-01T00:00:00+00:00"
},
"done": true,
"uuid":"36f59381-5b54-48bd-a0c7-3b908c476732",
"workflow": "B2B\\TCA\\Wizards\\Workflow\\TerminateWorkflow"
}