Yield-as-a-Service (1.0.0)

Download OpenAPI specification:Download

Common

Get the latest products offerings

header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get list of assets

header Parameters
apikey
required
any

Responses

Response samples

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

Organization

Get organization deposit addresses

query Parameters
asset_id
required
string
header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get organization withdrawal addresses

header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get organization balances

header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create withdrawal request

header Parameters
apikey
required
any
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "amount": "string",
  • "destination_address": "string",
  • "external_tx_id": "string",
  • "asset_id": "USDT"
}

Response samples

Content type
application/json
{
  • "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"
}

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
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
{
  • "count": 21,
  • "results": [
    ]
}

Notify about a new deposit transaction

Request Body schema: application/json
txhash_url
required
string
amount
required
string
asset_id
required
string

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

product
required
string
Value: "highyield"
tx_timestamp
required
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "txhash": "string",
  • "amount": 1.2,
  • "asset_id": "USDC",
  • "product": "highyield",
  • "tx_timestamp": "2018-02-10T09:30Z"
}

Perform pre-submission withdrawal request validation

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "amount": "string",
  • "destination_address": "string",
  • "external_tx_id": "string",
  • "asset_id": "USDT"
}

Response samples

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

Allocate reserve funds

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

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

query Parameters
asset_id
required
string
header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get organization reserve account balances

header Parameters
apikey
required
string

Responses

Response samples

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

Sub-Account

Get list of sub-clients

header Parameters
apikey
required
any

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create new sub-client

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

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

required
Array of objects (Root Type for WithdrawalWallet) [ items ]
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": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "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
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
{
  • "count": 21,
  • "results": [
    ]
}

Create withdrawal request

header Parameters
apikey
required
any
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "amount": "string",
  • "destination_address": "string",
  • "external_tx_id": "string",
  • "asset_id": "USDT",
  • "client_id": "string"
}

Response samples

Content type
application/json
{
  • "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"
}

Get deposit addresses

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

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get withdrawal addresses

query Parameters
client_id
required
any
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
authorization_key
required
string
required
Array of objects (Root Type for WithdrawalWalletsWithCurrency) [ items ]
client_id
required
string

Responses

Request samples

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

Get sub-client balances

query Parameters
client_id
required
string
header Parameters
apikey
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Notify about a new deposit transaction

Request Body schema: application/json
amount
required
string
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
required
string
Value: "highyield"
txhash
required
string
tx_timestamp
required
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "txhash": "string",
  • "amount": 1.2,
  • "asset_id": "USDC",
  • "client_id": "string",
  • "product": "highyield",
  • "tx_timestamp": "2022-02-10T09:30Z"
}

Perform pre-submission withdrawal request validation

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "amount": "string",
  • "destination_address": "string",
  • "external_tx_id": "string",
  • "asset_id": "USDT",
  • "client_id": "string"
}

Response samples

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