Sub-clients

Explore resources

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

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Responses

200List of clients

application/jsonarray of User

NameTypeDescription
client_idstringstring

Client id provided to Coinchange when client was initially created by external system

first_namestringstring
last_namestringstring
Example
[
  {
    "client_id": "string",
    "first_name": "string",
    "last_name": "string"
  }
]

401Unauthorized

POST/earn_clients/

Create new sub-client

Header parameters

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Request body

application/jsonrequired

NameTypeDescription
client_idstringrequiredstring

Unique client ID from the partner system creating the sub-client.

withdrawal_walletsarray of WithdrawalWalletrequiredarray of WithdrawalWallet
withdrawal_wallets[].addressstringstring
withdrawal_wallets[].asset_idstringstring

Id of the asset, refer to response from /assets/ endpoint

withdrawal_wallets[].nicknamestringstring
first_namestringstring

First name of the client. Used in client searches.

last_namestringstring

Last name of the client. Used in client searches.

Example
{
  "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

application/json

NameTypeDescription
withdraw_address_change_authorization_keystringstring

This key should be further used to modify allowed withdrawal addresses.

Example
{
  "withdraw_address_change_authorization_key": "string"
}

400Bad Request

application/jsonarray of Error

NameTypeDescription
field_namestringstring
error_detailsarray of ErrorDetailrequiredarray of ErrorDetail
error_details[].messagestringstring
error_details[].codestringstring
Example
[
  {
    "field_name": "string",
    "error_details": [
      {
        "message": "string",
        "code": "string"
      },
      {
        "message": "string",
        "code": "string"
      }
    ]
  }
]

401Unauthorized

GET/earn_clients/balances/

Get sub-client balances

Header parameters

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Query parameters

NameTypeDescription
client_idstringrequiredstring

Responses

200Client's balances

application/jsonarray of BalanceResponse

NameTypeDescription
asset_idstringstring

Id of the asset, refer to response from /assets/ endpoint

available_for_withdrawalstringstring

Amount currently available to request for withdrawal.

earn_totalstringstring

Cumulative total since creation of this client account.

earn_90dstringstring
earn_30dstringstring
earn_7dstringstring
earn_1dstringstring
totalstringstring

DEPRECATED. Please use total_balance instead

last_payout_datestring (date-time)string (date-time)

Can be null if no payouts have been made yet.

last_payout_amountstringstring

Can be null if no payouts have been made yet.

total_balancestringrequiredstring

Total current balance for a given asset ID.

Example
[
  {
    "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

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Request body

application/jsonrequired

NameTypeDescription
amountstringrequiredstring
asset_idstringrequiredstring

Id of the asset, refer to response from /assets/ endpoint

client_idstringrequiredstring

Client id provided to Coinchange when client was initially created by external system

productstringrequiredstring

Allowed values: highyield

txhashstringrequiredstring
tx_timestampstring (date-time)requiredstring (date-time)
Example
{
  "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

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Query parameters

NameTypeDescription
client_idstringrequiredstring
takeintegerinteger

Specify how many transactions to take

skipintegerinteger

Specify how many transactions to skip starting from the first one

asset_idstringstring

Responses

200List of transaction's statuses

application/json

NameTypeDescription
countintegerinteger

Count of all objects

resultsarray of TransactionResponsearray of TransactionResponse
results[].idstringstring

Coinchange unique transaction reference

results[].statusstringstring

Allowed values: REQUESTED, TRANSFERRED_OUT, SENDING, SUCCESS, FAILED

results[].client_idstringstring

Client id provided to Coinchange when client was initially created by external system

results[].destination_addressstringstring
results[].notestringstring
results[].external_tx_idstringstring

Transaction id passed to Coinchange by an external system in the original withdrawal request.

results[].asset_idstringstring

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[].txhashstringstring
results[].txhash_urlstringstring
results[].transaction_typestringstring

Allowed values: EARN, DEPOSIT, WITHDRAW

results[].fee_amountstringstring
results[].gross_amountstringstring
results[].net_amountstringstring
Example
{
  "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

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Request body

application/jsonrequired

NameTypeDescription
amountstringrequiredstring
destination_addressstringrequiredstring
external_tx_idstringstring

Transaction id passed to Coinchange by an external system in the original withdrawal request.

asset_idstringrequiredstring

Id of the asset, refer to response from /assets/ endpoint

client_idstringrequiredstring

Client id provided to Coinchange when client was initially created by external system

Example
{
  "amount": "string",
  "destination_address": "string",
  "external_tx_id": "string",
  "asset_id": "USDT",
  "client_id": "string"
}

Responses

200OK

application/json

NameTypeDescription
gross_amountstringstring
net_amountstringstring
fee_amountstringstring
withdrawal_statusstringstring

Allowed values: Success

messagestringstring
Example
{
  "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

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Request body

application/jsonrequired

NameTypeDescription
amountstringrequiredstring
destination_addressstringrequiredstring
external_tx_idstringstring

Transaction id passed to Coinchange by an external system in the original withdrawal request.

asset_idstringrequiredstring

Id of the asset, refer to response from /assets/ endpoint

client_idstringrequiredstring

Client id provided to Coinchange when client was initially created by external system

Example
{
  "amount": "string",
  "destination_address": "string",
  "external_tx_id": "string",
  "asset_id": "USDT",
  "client_id": "string"
}

Responses

201OK

application/json

NameTypeDescription
idstringstring

Coinchange unique transaction reference

statusstringstring

Allowed values: REQUESTED, TRANSFERRED_OUT, SENDING, SUCCESS, FAILED

client_idstringstring

Client id provided to Coinchange when client was initially created by external system

destination_addressstringstring
notestringstring
external_tx_idstringstring

Transaction id passed to Coinchange by an external system in the original withdrawal request.

asset_idstringstring

Id of the asset, refer to response from /assets/ endpoint

created_atstring (date-time)string (date-time)
modified_atstring (date-time)string (date-time)
txhashstringstring
txhash_urlstringstring
transaction_typestringstring

Allowed values: EARN, DEPOSIT, WITHDRAW

fee_amountstringstring
gross_amountstringstring
net_amountstringstring
Example
{
  "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

application/jsonarray of Error

NameTypeDescription
field_namestringstring
error_detailsarray of ErrorDetailrequiredarray of ErrorDetail
error_details[].messagestringstring
error_details[].codestringstring
Example
[
  {
    "field_name": "string",
    "error_details": [
      {
        "message": "string",
        "code": "string"
      },
      {
        "message": "string",
        "code": "string"
      }
    ]
  }
]

401Unauthorized

GET/earn_clients/wallets/deposit/

Get deposit addresses

Header parameters

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Query parameters

NameTypeDescription
client_idstringrequiredstring
asset_idstringrequiredstring

Responses

200OK

application/jsonarray of DepositWallet

NameTypeDescription
addressstringstring
asset_idstringstring
nicknamestringstring
Example
[
  {
    "asset_id": "USDT",
    "address": "string",
    "nickname": "string"
  }
]

400Bad Request

application/jsonarray of Error

NameTypeDescription
field_namestringstring
error_detailsarray of ErrorDetailrequiredarray of ErrorDetail
error_details[].messagestringstring
error_details[].codestringstring
Example
[
  {
    "field_name": "string",
    "error_details": [
      {
        "message": "string",
        "code": "string"
      },
      {
        "message": "string",
        "code": "string"
      }
    ]
  }
]

401Unauthorized

GET/earn_clients/wallets/withdrawal/

Get withdrawal addresses

Header parameters

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Query parameters

NameTypeDescription
client_idanyrequiredany

Responses

200OK

application/jsonarray of WithdrawalWallet

NameTypeDescription
addressstringstring
asset_idstringstring

Id of the asset, refer to response from /assets/ endpoint

nicknamestringstring
Example
[
  {
    "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

NameTypeDescription
apikeystringrequiredstring

API key issued to the integration partner.

Request body

application/jsonrequired

NameTypeDescription
authorization_keystringrequiredstring
currenciesarray of WithdrawalWalletsWithCurrencyrequiredarray of WithdrawalWalletsWithCurrency
currencies[].currencystringstring
currencies[].withdrawal_walletsarray of stringarray of string
client_idstringrequiredstring
Example
{
  "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.

Back to API reference