Sub-clients
Endpoint paths, field names and enum values appear exactly as the API uses them. Some carry legacy names, such as earn_clients. They are identifiers, not product descriptions.
GET/earn_clients/
Get list of sub-clients
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Responses
200List of clients
| Name | Type | Description |
|---|---|---|
| client_idstring | string | Client id provided to Coinchange when client was initially created by external system |
| first_namestring | string | |
| last_namestring | string |
[
{
"client_id": "string",
"first_name": "string",
"last_name": "string"
}
]401Unauthorized
POST/earn_clients/
Create new sub-client
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Request body
| Name | Type | Description |
|---|---|---|
| client_idstringrequired | string | Unique client ID from the partner system creating the sub-client. |
| withdrawal_walletsarray of WithdrawalWalletrequired | array of WithdrawalWallet | |
| withdrawal_wallets[].addressstring | string | |
| withdrawal_wallets[].asset_idstring | string | Id of the asset, refer to response from /assets/ endpoint |
| withdrawal_wallets[].nicknamestring | string | |
| first_namestring | string | First name of the client. Used in client searches. |
| last_namestring | string | Last name of the client. Used in client searches. |
{
"client_id": "string",
"first_name": "string",
"last_name": "string",
"withdrawal_wallets": [
{
"address": "string",
"asset_id": "USDT",
"nickname": "string"
},
{
"address": "string",
"asset_id": "USDC"
}
]
}Responses
201Created
| Name | Type | Description |
|---|---|---|
| withdraw_address_change_authorization_keystring | string | This key should be further used to modify allowed withdrawal addresses. |
{
"withdraw_address_change_authorization_key": "string"
}400Bad Request
| Name | Type | Description |
|---|---|---|
| field_namestring | string | |
| error_detailsarray of ErrorDetailrequired | array of ErrorDetail | |
| error_details[].messagestring | string | |
| error_details[].codestring | string |
[
{
"field_name": "string",
"error_details": [
{
"message": "string",
"code": "string"
},
{
"message": "string",
"code": "string"
}
]
}
]401Unauthorized
GET/earn_clients/balances/
Get sub-client balances
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Query parameters
| Name | Type | Description |
|---|---|---|
| client_idstringrequired | string |
Responses
200Client's balances
| Name | Type | Description |
|---|---|---|
| asset_idstring | string | Id of the asset, refer to response from /assets/ endpoint |
| available_for_withdrawalstring | string | Amount currently available to request for withdrawal. |
| earn_totalstring | string | Cumulative total since creation of this client account. |
| earn_90dstring | string | |
| earn_30dstring | string | |
| earn_7dstring | string | |
| earn_1dstring | string | |
| totalstring | string | DEPRECATED. Please use |
| last_payout_datestring (date-time) | string (date-time) | Can be null if no payouts have been made yet. |
| last_payout_amountstring | string | Can be null if no payouts have been made yet. |
| total_balancestringrequired | string | Total current balance for a given asset ID. |
[
{
"asset_id": "USDC",
"available_for_withdrawal": "string",
"earn_total": "string",
"earn_90d": "string",
"earn_30d": "string",
"earn_7d": "string",
"earn_1d": "string",
"total": "string",
"total_balance": "string",
"last_payout_date": "2022-12-10T09:30Z",
"last_payout_amount": "string"
}
]401Unauthorized
404Not Found
POST/earn_clients/deposit/notify/
Notify about a new deposit transaction
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Request body
| Name | Type | Description |
|---|---|---|
| amountstringrequired | string | |
| asset_idstringrequired | string | Id of the asset, refer to response from /assets/ endpoint |
| client_idstringrequired | string | Client id provided to Coinchange when client was initially created by external system |
| productstringrequired | string | Allowed values: |
| txhashstringrequired | string | |
| tx_timestampstring (date-time)required | string (date-time) |
{
"amount": "string",
"asset_id": "string",
"client_id": "string",
"product": "highyield",
"txhash": "string",
"tx_timestamp": "string"
}Responses
204no content
GET/earn_clients/transactions/
Get sub-client transaction history
Use this operation to check on the status of the in-progress withdrawal requests.
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Query parameters
| Name | Type | Description |
|---|---|---|
| client_idstringrequired | string | |
| takeinteger | integer | Specify how many transactions to take |
| skipinteger | integer | Specify how many transactions to skip starting from the first one |
| asset_idstring | string |
Responses
200List of transaction's statuses
| Name | Type | Description |
|---|---|---|
| countinteger | integer | Count of all objects |
| resultsarray of TransactionResponse | array of TransactionResponse | |
| results[].idstring | string | Coinchange unique transaction reference |
| results[].statusstring | string | Allowed values: |
| results[].client_idstring | string | Client id provided to Coinchange when client was initially created by external system |
| results[].destination_addressstring | string | |
| results[].notestring | string | |
| results[].external_tx_idstring | string | Transaction id passed to Coinchange by an external system in the original withdrawal request. |
| results[].asset_idstring | string | Id of the asset, refer to response from /assets/ endpoint |
| results[].created_atstring (date-time) | string (date-time) | |
| results[].modified_atstring (date-time) | string (date-time) | |
| results[].txhashstring | string | |
| results[].txhash_urlstring | string | |
| results[].transaction_typestring | string | Allowed values: |
| results[].fee_amountstring | string | |
| results[].gross_amountstring | string | |
| results[].net_amountstring | string |
{
"count": 21,
"results": [
{
"id": "string",
"status": "REQUESTED",
"client_id": "string",
"destination_address": "string",
"note": "string",
"external_tx_id": "string",
"asset_id": "string",
"created_at": "2012-12-10T09:30Z",
"modified_at": "2012-12-10T09:30Z",
"txhash": "string",
"txhash_url": "string",
"transaction_type": "WITHDRAW",
"fee_amount": "string",
"gross_amount": "string",
"net_amount": "string"
},
{
"id": "string",
"status": "REQUESTED",
"client_id": "string",
"destination_address": "string",
"note": "string",
"external_tx_id": "string",
"asset_id": "string",
"created_at": "2022-12-10T09:30Z",
"modified_at": "2022-12-10T09:30Z",
"txhash": "string",
"txhash_url": "string",
"transaction_type": "EARN",
"fee_amount": "string",
"gross_amount": "string",
"net_amount": "string"
}
]
}401Unauthorized
POST/earn_clients/transactions/validate_withdrawal_request/
Perform pre-submission withdrawal request validation
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Request body
| Name | Type | Description |
|---|---|---|
| amountstringrequired | string | |
| destination_addressstringrequired | string | |
| external_tx_idstring | string | Transaction id passed to Coinchange by an external system in the original withdrawal request. |
| asset_idstringrequired | string | Id of the asset, refer to response from /assets/ endpoint |
| client_idstringrequired | string | Client id provided to Coinchange when client was initially created by external system |
{
"amount": "string",
"destination_address": "string",
"external_tx_id": "string",
"asset_id": "USDT",
"client_id": "string"
}Responses
200OK
| Name | Type | Description |
|---|---|---|
| gross_amountstring | string | |
| net_amountstring | string | |
| fee_amountstring | string | |
| withdrawal_statusstring | string | Allowed values: |
| messagestring | string |
{
"gross_amount": "string",
"net_amount": "string",
"fee_amount": "string",
"withdrawal_status": "Success",
"message": "string"
}400Bad Request
401Unauthorized
POST/earn_clients/transactions/withdraw/
Create withdrawal request
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Request body
| Name | Type | Description |
|---|---|---|
| amountstringrequired | string | |
| destination_addressstringrequired | string | |
| external_tx_idstring | string | Transaction id passed to Coinchange by an external system in the original withdrawal request. |
| asset_idstringrequired | string | Id of the asset, refer to response from /assets/ endpoint |
| client_idstringrequired | string | Client id provided to Coinchange when client was initially created by external system |
{
"amount": "string",
"destination_address": "string",
"external_tx_id": "string",
"asset_id": "USDT",
"client_id": "string"
}Responses
201OK
| Name | Type | Description |
|---|---|---|
| idstring | string | Coinchange unique transaction reference |
| statusstring | string | Allowed values: |
| client_idstring | string | Client id provided to Coinchange when client was initially created by external system |
| destination_addressstring | string | |
| notestring | string | |
| external_tx_idstring | string | Transaction id passed to Coinchange by an external system in the original withdrawal request. |
| asset_idstring | string | Id of the asset, refer to response from /assets/ endpoint |
| created_atstring (date-time) | string (date-time) | |
| modified_atstring (date-time) | string (date-time) | |
| txhashstring | string | |
| txhash_urlstring | string | |
| transaction_typestring | string | Allowed values: |
| fee_amountstring | string | |
| gross_amountstring | string | |
| net_amountstring | string |
{
"id": "string",
"status": "TRANSFERRED_OUT",
"client_id": "string",
"destination_address": "string",
"note": "string",
"external_tx_id": "string",
"asset_id": "USDC",
"gross_amount": "string",
"net_amount": "string",
"fee_amount": "string",
"created_at": "2022-06-12T19:27:12.895815Z",
"modified_at": "2022-06-16T09:45:43.896465Z",
"txhash": "string",
"txhash_url": "string",
"transaction_type": "WITHDRAW"
}400Bad Request
| Name | Type | Description |
|---|---|---|
| field_namestring | string | |
| error_detailsarray of ErrorDetailrequired | array of ErrorDetail | |
| error_details[].messagestring | string | |
| error_details[].codestring | string |
[
{
"field_name": "string",
"error_details": [
{
"message": "string",
"code": "string"
},
{
"message": "string",
"code": "string"
}
]
}
]401Unauthorized
GET/earn_clients/wallets/deposit/
Get deposit addresses
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Query parameters
| Name | Type | Description |
|---|---|---|
| client_idstringrequired | string | |
| asset_idstringrequired | string |
Responses
200OK
| Name | Type | Description |
|---|---|---|
| addressstring | string | |
| asset_idstring | string | |
| nicknamestring | string |
[
{
"asset_id": "USDT",
"address": "string",
"nickname": "string"
}
]400Bad Request
| Name | Type | Description |
|---|---|---|
| field_namestring | string | |
| error_detailsarray of ErrorDetailrequired | array of ErrorDetail | |
| error_details[].messagestring | string | |
| error_details[].codestring | string |
[
{
"field_name": "string",
"error_details": [
{
"message": "string",
"code": "string"
},
{
"message": "string",
"code": "string"
}
]
}
]401Unauthorized
GET/earn_clients/wallets/withdrawal/
Get withdrawal addresses
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Query parameters
| Name | Type | Description |
|---|---|---|
| client_idanyrequired | any |
Responses
200OK
| Name | Type | Description |
|---|---|---|
| addressstring | string | |
| asset_idstring | string | Id of the asset, refer to response from /assets/ endpoint |
| nicknamestring | string |
[
{
"asset_id": "USDT",
"address": "string",
"nickname": "string"
}
]401Unauthorized
POST/earn_clients/wallets/withdrawal/
Update withdrawal wallets
This operation completely replaces all previous wallets with the provided ones.
Header parameters
| Name | Type | Description |
|---|---|---|
| apikeystringrequired | string | API key issued to the integration partner. |
Request body
| Name | Type | Description |
|---|---|---|
| authorization_keystringrequired | string | |
| currenciesarray of WithdrawalWalletsWithCurrencyrequired | array of WithdrawalWalletsWithCurrency | |
| currencies[].currencystring | string | |
| currencies[].withdrawal_walletsarray of string | array of string | |
| client_idstringrequired | string |
{
"authorization_key": "string",
"client_id": "123",
"currencies": [
{
"currency": "USDC",
"withdrawal_wallets": [
"0X283OINCAIP78387327623AD",
"0xALKSDFOP8Q23AEFP938HFA3"
]
},
{
"currency": "BTC",
"withdrawal_wallets": [
"0X283OINCAIP78387327623AD",
"0xALKSDFOP8Q23AEFP938HFA3"
]
}
]
}Responses
200OK
Technical documentation is provided to institutional integration partners for integration work. It is not an offer or a solicitation. Availability of products, assets and endpoints varies by partner and jurisdiction.
