Yield-as-a-Service-v2 (2.0.3)

Download OpenAPI specification:

Common

Get the latest products offerings

header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
{
  • "available_products": [
    ]
}

Get list of assets

header Parameters
apikey
required
any

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    },
  • {
    },
  • {
    },
  • {
    }
]

Organization

Get organization deposit addresses

query Parameters
product_code
required
string
asset_id
required
string
header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
{
  • "addresses": [
    ]
}

Get organization withdrawal addresses

header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get organization balances

query Parameters
product_code
string

Filter balances by product code. If not specified, returns balances for all products

header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Create withdrawal request

header Parameters
apikey
required
string
Request Body schema: application/json
required
amount
required
string
destination_address
required
string
external_tx_id
string
asset_id
required
string

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

product_code
required
string

Product code for the withdrawal

Responses

Request samples

Content type
application/json
{
  • "amount": "100000.0",
  • "destination_address": "0xD2c6ADc7E90f29442e458F90958ed8731AC1f2A3",
  • "external_tx_id": "string",
  • "asset_id": "USDT",
  • "product_code": "growth_account_usdt"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "TRANSFERRED_OUT",
  • "client_id": "clientid-1234567890",
  • "destination_address": "0xD2c6ADc7E90f29442e458F90958ed8731AC1f2A3",
  • "note": "string",
  • "external_tx_id": "string",
  • "asset_id": "USDC",
  • "product_code": "growth_account_usdc",
  • "requested_amount": "100000.0",
  • "received_amount": "100000.0",
  • "net_amount": "100000.0",
  • "fee_amount": "0.0",
  • "created_at": "2022-06-12T19:27:12.895815Z",
  • "modified_at": "2022-06-16T09:45:43.896465Z",
  • "txhash": "string",
  • "txhash_url": "string",
  • "transaction_type": "WITHDRAW"
}

Get organization transaction history

Transaction list on ogranization level does not include transactions for individual sub-clients. Use this operation to check status of in-progress withdrawal requests.

query Parameters
product_code
string

Filter transactions by product code. If not specified, returns transactions for all products

transaction_id
string
skip
integer

Specify how many transactions to skip starting from the first one

take
integer

Specify how many transactions to take

asset_id
string
header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Notify about a new deposit transaction

Request Body schema: application/json
required
asset_id
required
string

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

product_code
required
string
txhash
required
string
amount
required
string
tx_timestamp
required
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "asset_id": "USDC",
  • "product_code": "growth_account_usdc",
  • "txhash": "string",
  • "amount": "150000.0",
  • "tx_timestamp": "2018-02-10T09:30:00Z"
}

Response samples

Content type
application/json
Example
[
  • {
    }
]

Perform pre-submission withdrawal request validation

Request Body schema: application/json
required
amount
required
string
destination_address
required
string
external_tx_id
string
asset_id
required
string

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

product_code
required
string

Product code for the withdrawal

Responses

Request samples

Content type
application/json
{
  • "amount": "100000.0",
  • "destination_address": "0xD2c6ADc7E90f29442e458F90958ed8731AC1f2A3",
  • "external_tx_id": "string",
  • "asset_id": "USDT",
  • "product_code": "growth_account_usdt"
}

Response samples

Content type
application/json
{
  • "requested_amount": "string",
  • "received_amount": "string",
  • "net_amount": "string",
  • "fee_amount": "string",
  • "withdrawal_status": "Success",
  • "message": "string"
}

Allocate reserve funds

Reserve account can be used only in conjunction with sub-accounts. Reserve account cannot be used for organization-level deposits.

Request Body schema: application/json
required
required
Array of objects (Root Type for Allocation)

Responses

Request samples

Content type
application/json
{
  • "allocations": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "error": { },
  • "status": "success",
  • "remaining_reserve_balances": [
    ]
}

Get organization reserve account deposit addresses

Reserve account can be used only in conjunction with sub-accounts. Reserve account cannot be used for organization-level deposits.

query Parameters
asset_id
required
string
header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get organization reserve account balances

Reserve account can be used only in conjunction with sub-accounts. Reserve account cannot be used for organization-level deposits.

header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Sub-Account

Get list of sub-clients

header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new sub-client

header Parameters
apikey
required
any
Request Body schema: application/json
required
client_id
required
string

Unique client ID from the system requesting to create the earn client

required
Array of objects (Root Type for WithdrawalWallet)
first_name
string

First name of the client. Used in client searches.

last_name
string

Last name of the client. Used in client searches.

Responses

Request samples

Content type
application/json
{
  • "client_id": "clientid-1234567890",
  • "first_name": "John",
  • "last_name": "Smith",
  • "withdrawal_wallets": [
    ]
}

Response samples

Content type
application/json
{
  • "withdraw_address_change_authorization_key": "#&AgY92a^Z$39d"
}

Get sub-client transaction history

Use this operation to check on the status of the in-progress withdrawal requests.

query Parameters
client_id
required
string
product_code
string

Filter transactions by product code. If not specified, returns transactions for all products

take
integer

Specify how many transactions to take

skip
integer

Specify how many transactions to skip starting from the first one

asset_id
string
header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Create withdrawal request

header Parameters
apikey
required
string
Request Body schema: application/json
required
amount
required
string
destination_address
required
string
external_tx_id
string

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

asset_id
required
string

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

client_id
required
string

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

product_code
required
string

Product code for the withdrawal

Responses

Request samples

Content type
application/json
{
  • "amount": "100000.0",
  • "destination_address": "0xD2c6ADc7E90f29442e458F90958ed8731AC1f2A3",
  • "external_tx_id": "string",
  • "asset_id": "USDT",
  • "client_id": "clientid-1234567890",
  • "product_code": "growth_account_usdt"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "status": "TRANSFERRED_OUT",
  • "client_id": "clientid-1234567890",
  • "destination_address": "0xD2c6ADc7E90f29442e458F90958ed8731AC1f2A3",
  • "note": "string",
  • "external_tx_id": "string",
  • "asset_id": "USDC",
  • "product_code": "growth_account_usdc",
  • "requested_amount": "100000.0",
  • "received_amount": "100000.0",
  • "net_amount": "100000.0",
  • "fee_amount": "0.0",
  • "created_at": "2022-06-12T19:27:12.895815Z",
  • "modified_at": "2022-06-16T09:45:43.896465Z",
  • "txhash": "string",
  • "txhash_url": "string",
  • "transaction_type": "WITHDRAW"
}

Get deposit addresses

query Parameters
client_id
required
string
product_code
required
string
asset_id
required
string
header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
{
  • "addresses": [
    ]
}

Get withdrawal addresses

query Parameters
client_id
required
string
header Parameters
apikey
required
any

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update withdrawal wallets

This operation completely replaces all previous wallets with the provided ones.

header Parameters
apikey
required
any
Request Body schema: application/json
required
authorization_key
required
string
required
Array of objects (Root Type for WithdrawalWalletsWithCurrency)
client_id
required
string

Responses

Request samples

Content type
application/json
{
  • "authorization_key": "KSIiw3!ioj@4adsmDOIJ3",
  • "client_id": "clientid-1234567890",
  • "currencies": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Get sub-client balances

query Parameters
client_id
required
string
product_code
string

Filter balances by product code. If not specified, returns balances for all products

header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
{
  • "products": [
    ]
}

Notify about a new deposit transaction

Request Body schema: application/json
required
asset_id
required
string

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

product_code
required
string
txhash
required
string
amount
required
string
tx_timestamp
required
string <date-time>
client_id
required
string

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

Responses

Request samples

Content type
application/json
{
  • "asset_id": "USDC",
  • "product_code": "growth_account_usdc",
  • "txhash": "string",
  • "amount": "150000.0",
  • "tx_timestamp": "2022-02-10T09:30:00Z",
  • "client_id": "clientid-1234567890"
}

Response samples

Content type
application/json
Example
[
  • {
    }
]

Perform pre-submission withdrawal request validation

Request Body schema: application/json
required
amount
required
string
destination_address
required
string
external_tx_id
string

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

asset_id
required
string

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

client_id
required
string

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

product_code
required
string

Product code for the withdrawal

Responses

Request samples

Content type
application/json
{
  • "amount": "100000.0",
  • "destination_address": "0xD2c6ADc7E90f29442e458F90958ed8731AC1f2A3",
  • "external_tx_id": "string",
  • "asset_id": "USDT",
  • "client_id": "clientid-1234567890",
  • "product_code": "growth_account_usdt"
}

Response samples

Content type
application/json
{
  • "requested_amount": "string",
  • "received_amount": "string",
  • "net_amount": "string",
  • "fee_amount": "string",
  • "withdrawal_status": "Success",
  • "message": "string"
}