Created
June 14, 2023 05:13
-
-
Save RaghavSood/7a4207b4b8c28cb7c6d64aa62b209718 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
openapi: 3.1.0 | |
info: | |
title: Coinhako Public API | |
version: v1 | |
description: | | |
### How to get an API key | |
Our API is currently in beta. If you would like to get an API key, please contact us at [hello@coinhako.com](mailto:hello@coinhako.com) | |
### Authentication | |
All endpoints require the following additional parameters to be sent in the request header: `X-API-KEY` hexadecimal public key, `X-API-Signature` hexadecimal signature, and `X-API-Timestamp` in unix time. | |
#### Signature | |
Generate a pair of public and private key pair using the ECDSA algorithm, with the secp256k1 elliptic curve. | |
Sign the request body with the private key generated. The signature is then encoded as a uppercase hexadecimal string and is returned in the request header under `X-API-Signature`. | |
#### Signature Input Scheme | |
*signature='method=@method&target-uri=@target-uri&content-digest=@content-digest&created=@created&alg=@alg'* | |
`@method` refers to the HTTP verb used for this request (GET, POST, PUT, PATCH, DELETE) | |
`@target-uri` refers to the full absolute URL of the request, including the authority, request target and parameters if any (eg. `https://www.example.com/path?param=value`) | |
`@content-digest` refers request body that has been hashed with sha256 and in hexadecimal encoding, uppercase string | |
`@created` has the same value as `X-API-Timestamp` | |
`@alg` is the algorithm used, which is `ecdsa-secp256k1-sha256` | |
#### Example in Ruby: | |
```ruby | |
require 'openssl' | |
payload = { "foo": "bar" } | |
timestamp = 1684149207947 | |
algorithm = 'ecdsa-secp256k1-sha256' | |
content_digest = OpenSSL::Digest.digest('SHA256', payload.to_json).unpack1('H*').upcase | |
method = 'POST' | |
target_uri = 'http://www.example.com/path?param=value | |
signature_input = "method=#{method}&target-uri=#{target_uri}&content-digest=#{content_digest}&created=#{timestamp}&alg=#{algorithm}" | |
message_hash = OpenSSL::Digest::SHA256.digest(signature_input) | |
signature = ec.dsa_sign_asn1(message_hash).unpack1('H*').upcase | |
``` | |
### Errors | |
Errors are returned in the following format: | |
```json | |
{ | |
"errors": [ | |
{ | |
"title": "a short, human-readable summary of the problem" | |
} | |
] | |
} | |
``` | |
x-logo: | |
url: https://www.coinhako.com/assets/images/coinhako_logo.svg | |
paths: | |
"/public_api/v1/balances": | |
get: | |
summary: Get all balances | |
tags: | |
- Balances | |
description: Returns all available account balances. Assets that have never | |
previously been interacted with may not be present in the response. | |
parameters: | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
currency: | |
type: string | |
available_balance: | |
type: string | |
required: | |
- currency | |
- available_balance | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
"/public_api/v1/crypto/addresses": | |
get: | |
summary: Get addresses | |
tags: | |
- Crypto Addresses | |
parameters: | |
- name: asset | |
in: query | |
required: false | |
description: Asset to retreive addresses for | |
schema: | |
type: string | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
id: | |
type: string | |
asset: | |
type: string | |
network: | |
type: string | |
address: | |
type: string | |
tag: | |
type: string | |
required: | |
- id | |
- asset | |
- network | |
- address | |
- tag | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
post: | |
summary: Create address | |
tags: | |
- Crypto Addresses | |
parameters: | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
id: | |
type: string | |
asset: | |
type: string | |
network: | |
type: string | |
address: | |
type: string | |
tag: | |
type: string | |
required: | |
- id | |
- asset | |
- network | |
- address | |
- tag | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
asset: | |
type: string | |
required: true | |
description: '' | |
network: | |
type: string | |
required: true | |
description: Mainnets only | |
"/public_api/v1/fiat_deposits": | |
get: | |
summary: Get all fiat deposits | |
tags: | |
- Fiat Deposits | |
parameters: | |
- name: page[number] | |
in: query | |
required: false | |
description: Current page (defaults to 1) | |
default: 1 | |
schema: | |
type: integer | |
- name: page[size] | |
in: query | |
required: false | |
description: Number of items per page (defaults to 50) | |
default: 50 | |
schema: | |
type: integer | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
id: | |
type: integer | |
currency: | |
type: string | |
amount: | |
type: string | |
transfer_method: | |
type: string | |
created_at: | |
type: integer | |
status: | |
type: string | |
required: | |
- id | |
- currency | |
- amount | |
- transfer_method | |
- created_at | |
- status | |
additionalProperties: false | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
"/public_api/v1/fiat_deposits/{id}": | |
get: | |
summary: Get a fiat deposit | |
tags: | |
- Fiat Deposits | |
parameters: | |
- name: id | |
in: path | |
description: Fiat Deposit ID | |
required: true | |
schema: | |
type: string | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: object | |
properties: | |
id: | |
type: integer | |
currency: | |
type: string | |
amount: | |
type: string | |
transfer_method: | |
type: string | |
created_at: | |
type: integer | |
status: | |
type: string | |
required: | |
- id | |
- currency | |
- amount | |
- transfer_method | |
- created_at | |
- status | |
additionalProperties: false | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
"/public_api/v1/fiat_withdrawal": | |
get: | |
summary: Get fiat withdrawals | |
tags: | |
- Fiat Withdrawals | |
parameters: | |
- name: asset | |
in: query | |
required: false | |
description: Asset to retreive fiat withdrawals for | |
schema: | |
type: string | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
id: | |
type: string | |
asset: | |
type: string | |
bank_reference: | |
type: string | |
status: | |
type: string | |
amount: | |
type: string | |
withdrawal_fee: | |
type: string | |
bank_account_id: | |
type: string | |
required: | |
- id | |
- asset | |
- bank_reference | |
- status | |
- amount | |
- withdrawal_fee | |
- bank_account_id | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
post: | |
summary: Create fiat withdrawal | |
tags: | |
- Fiat Withdrawals | |
parameters: | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
id: | |
type: string | |
asset: | |
type: string | |
bank_reference: | |
type: string | |
status: | |
type: string | |
amount: | |
type: string | |
withdrawal_fee: | |
type: string | |
bank_account_id: | |
type: string | |
required: | |
- id | |
- asset | |
- bank_reference | |
- status | |
- amount | |
- withdrawal_fee | |
- bank_account_id | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
asset: | |
type: string | |
required: true | |
description: '' | |
bank_account_id: | |
type: string | |
required: true | |
description: Request the ID from your RM | |
amount: | |
type: string | |
required: true | |
description: '' | |
"/public_api/v1/order_quotes": | |
post: | |
summary: Create Order Quote | |
tags: | |
- Order Quotes | |
parameters: | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'201': | |
description: order quote created | |
content: | |
application/vnd.api+json: | |
schema: | |
type: object | |
properties: | |
quote_id: | |
type: string | |
locked_price: | |
type: string | |
base_currency: | |
type: string | |
counter_currency: | |
type: string | |
amount: | |
type: string | |
expires_at: | |
type: integer | |
direction: | |
type: string | |
payment_method: | |
type: string | |
remain_seconds: | |
type: integer | |
required: | |
- quote_id | |
- locked_price | |
- base_currency | |
- counter_currency | |
- amount | |
- expires_at | |
- direction | |
- payment_method | |
- remain_seconds | |
additionalProperties: false | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
base_currency: | |
type: string | |
description: Base currency | |
counter_currency: | |
type: string | |
description: Counter currency | |
amount: | |
type: integer | |
description: Amount | |
payment_method: | |
type: string | |
description: Payment method | |
enum: | |
- user_balance | |
- credit_card | |
direction: | |
type: string | |
description: Direction | |
enum: | |
- buy | |
- sell | |
required: | |
- base_currency | |
- counter_currency | |
- amount | |
- payment_method | |
- direction | |
"/public_api/v1/orders": | |
get: | |
summary: Get orders | |
tags: | |
- Orders | |
parameters: | |
- name: page[number] | |
in: query | |
required: false | |
description: Current page (defaults to 1) | |
default: 1 | |
schema: | |
type: integer | |
- name: page[size] | |
in: query | |
required: false | |
description: Number of items per page (defaults to 50) | |
default: 50 | |
schema: | |
type: integer | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
id: | |
type: integer | |
order_receipt_id: | |
typ: string | |
direction: | |
type: integer | |
base_currency: | |
type: string | |
counter_currency: | |
type: string | |
order_amount: | |
type: string | |
created_at: | |
type: integer | |
status: | |
type: integer | |
order_amount_currency: | |
type: string | |
fee: | |
type: string | |
grab_pay_fee: | |
type: string | |
fee_currency: | |
type: string | |
net_amount: | |
type: 'null' | |
received_currency: | |
type: string | |
type: | |
type: string | |
reduced_fee_code: | |
type: 'null' | |
credit_card_fee: | |
type: string | |
message: | |
type: 'null' | |
price: | |
type: string | |
payment_method: | |
type: string | |
client_order_id: | |
type: | |
- string | |
- 'null' | |
required: | |
- id | |
- order_receipt_id | |
- direction | |
- base_currency | |
- counter_currency | |
- order_amount | |
- created_at | |
- status | |
- order_amount_currency | |
- fee | |
- grab_pay_fee | |
- fee_currency | |
- net_amount | |
- received_currency | |
- type | |
- reduced_fee_code | |
- credit_card_fee | |
- message | |
- price | |
- payment_method | |
- client_order_id | |
additionalProperties: false | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
post: | |
summary: Create Order | |
tags: | |
- Orders | |
parameters: | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'201': | |
description: order created | |
content: | |
application/vnd.api+json: | |
schema: | |
type: object | |
properties: | |
id: | |
type: integer | |
order_receipt_id: | |
typ: string | |
direction: | |
type: integer | |
base_currency: | |
type: string | |
counter_currency: | |
type: string | |
order_amount: | |
type: string | |
created_at: | |
type: integer | |
status: | |
type: integer | |
order_amount_currency: | |
type: string | |
fee: | |
type: string | |
nullable: true | |
grab_pay_fee: | |
type: string | |
fee_currency: | |
type: string | |
nullable: true | |
net_amount: | |
type: 'null' | |
received_currency: | |
type: string | |
type: | |
type: string | |
reduced_fee_code: | |
type: 'null' | |
credit_card_fee: | |
type: string | |
message: | |
type: string | |
price: | |
type: string | |
payment_method: | |
type: string | |
client_order_id: | |
type: | |
- string | |
- 'null' | |
required: | |
- id | |
- order_receipt_id | |
- direction | |
- base_currency | |
- counter_currency | |
- order_amount | |
- created_at | |
- status | |
- order_amount_currency | |
- fee | |
- grab_pay_fee | |
- fee_currency | |
- net_amount | |
- received_currency | |
- type | |
- reduced_fee_code | |
- credit_card_fee | |
- message | |
- price | |
- payment_method | |
- client_order_id | |
additionalProperties: false | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
base_currency: | |
type: string | |
description: Base currency | |
counter_currency: | |
type: string | |
description: Counter currency | |
amount: | |
type: integer | |
description: Amount | |
payment_method: | |
type: string | |
description: Payment method | |
enum: | |
- user_balance | |
- credit_card | |
order_quote_id: | |
type: string | |
description: Order Quote ID | |
direction: | |
type: string | |
description: Direction | |
enum: | |
- buy | |
- sell | |
client_order_id: | |
type: string | |
description: Client order id | |
required: | |
- base_currency | |
- counter_currency | |
- amount | |
- payment_method | |
- order_quote_id | |
- direction | |
"/public_api/v1/orders/{id}": | |
get: | |
summary: Get order details | |
tags: | |
- Orders | |
parameters: | |
- name: id | |
in: path | |
description: Order ID | |
required: true | |
schema: | |
type: string | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: object | |
properties: | |
id: | |
type: integer | |
order_receipt_id: | |
typ: string | |
direction: | |
type: integer | |
base_currency: | |
type: string | |
counter_currency: | |
type: string | |
order_amount: | |
type: string | |
created_at: | |
type: integer | |
status: | |
type: integer | |
order_amount_currency: | |
type: string | |
fee: | |
type: string | |
grab_pay_fee: | |
type: string | |
fee_currency: | |
type: string | |
net_amount: | |
type: 'null' | |
received_currency: | |
type: string | |
type: | |
type: string | |
reduced_fee_code: | |
type: 'null' | |
credit_card_fee: | |
type: string | |
message: | |
type: 'null' | |
price: | |
type: string | |
payment_method: | |
type: string | |
client_order_id: | |
type: | |
- string | |
- 'null' | |
required: | |
- id | |
- order_receipt_id | |
- direction | |
- base_currency | |
- counter_currency | |
- order_amount | |
- created_at | |
- status | |
- order_amount_currency | |
- fee | |
- grab_pay_fee | |
- fee_currency | |
- net_amount | |
- received_currency | |
- type | |
- reduced_fee_code | |
- credit_card_fee | |
- message | |
- price | |
- payment_method | |
- client_order_id | |
additionalProperties: false | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
"/public_api/v1/transactions": | |
get: | |
summary: Get all transactions | |
tags: | |
- Transactions | |
description: Returns all account transactions | |
parameters: | |
- name: page[number] | |
in: query | |
required: false | |
description: Current page (defaults to 1) | |
default: 1 | |
schema: | |
type: integer | |
- name: page[size] | |
in: query | |
required: false | |
description: Number of items per page (defaults to 50) | |
default: 50 | |
schema: | |
type: integer | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
id: | |
type: integer | |
currency: | |
type: string | |
created_at: | |
type: integer | |
account_updated_at: | |
type: integer | |
status: | |
type: string | |
amount: | |
type: string | |
transaction_type: | |
type: string | |
tx_id: | |
type: string | |
required: | |
- id | |
- currency | |
- created_at | |
- status | |
- amount | |
- transaction_type | |
additionalProperties: false | |
'401': | |
description: unauthorized response | |
content: | |
application/json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
"/public_api/v1/transactions/{id}": | |
get: | |
summary: Get specific transactions | |
tags: | |
- Transactions | |
description: Returns a single transactions | |
parameters: | |
- name: id | |
in: path | |
description: Transaction ID | |
required: true | |
schema: | |
type: string | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
id: | |
type: integer | |
currency: | |
type: string | |
created_at: | |
type: integer | |
account_updated_at: | |
type: integer | |
status: | |
type: string | |
amount: | |
type: string | |
transaction_type: | |
type: string | |
tx_id: | |
type: string | |
required: | |
- id | |
- currency | |
- created_at | |
- status | |
- amount | |
- transaction_type | |
additionalProperties: false | |
'401': | |
description: unauthorized response | |
content: | |
application/json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
"/public_api/v1/crypto/withdrawals": | |
get: | |
summary: Get withdrawals | |
tags: | |
- Crypto Withdrawals | |
parameters: | |
- name: page[number] | |
in: query | |
required: false | |
description: Current page (defaults to 1) | |
default: 1 | |
schema: | |
type: integer | |
- name: page[size] | |
in: query | |
required: false | |
description: Number of items per page (defaults to 50) | |
default: 50 | |
schema: | |
type: integer | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
user_id: | |
type: string | |
id: | |
type: number | |
tx_id: | |
type: string | |
asset: | |
type: string | |
network: | |
type: string | |
amount: | |
type: string | |
fee: | |
type: string | |
destination_address: | |
type: string | |
tag: | |
type: string | |
status: | |
type: string | |
required: | |
- user_id | |
- id | |
- tx_id | |
- asset | |
- network | |
- amount | |
- fee | |
- destination_address | |
- tag | |
- status | |
'401': | |
description: unauthorized response | |
content: | |
application/vnd.api+json: | |
schema: | |
"$ref": "#/components/schemas/error" | |
post: | |
summary: Create withdrawal | |
tags: | |
- Crypto Withdrawals | |
parameters: | |
- name: X-API-Signature | |
in: header | |
required: true | |
description: Hexadecimal encoded ECDSA Signature | |
schema: | |
type: string | |
- name: X-API-Timestamp | |
in: header | |
required: true | |
description: Timestamp in milliseconds | |
schema: | |
type: integer | |
- name: X-API-Algorithm | |
in: header | |
required: true | |
description: Algorithm used to sign request. Must be an ENUM value | |
schema: | |
type: string | |
security: | |
- api_key: [] | |
responses: | |
'200': | |
description: success response | |
content: | |
application/vnd.api+json: | |
schema: | |
type: array | |
items: | |
type: object | |
properties: | |
user_id: | |
type: string | |
id: | |
type: number | |
tx_id: | |
type: string | |
asset: | |
type: string | |
network: | |
type: string | |
amount: | |
type: string | |
fee: | |
type: string | |
destination_address: | |
type: string | |
tag: | |
type: string | |
status: | |
type: string | |
required: | |
- user_id | |
- id | |
- tx_id | |
- asset | |
- network | |
- amount | |
- fee | |
- destination_address | |
- tag | |
- status | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
destination_address: | |
type: string | |
required: true | |
description: '' | |
default: '' | |
tag: | |
type: string | |
required: false | |
description: A tag or memo as required by the network | |
default: '' | |
asset: | |
type: string | |
required: true | |
description: '' | |
network: | |
type: string | |
required: true | |
description: Mainnets only | |
amount: | |
type: string | |
required: true | |
description: '' | |
components: | |
securitySchemes: | |
api_key: | |
type: apiKey | |
name: X-API-KEY | |
in: header | |
schemas: | |
error: | |
type: object | |
properties: | |
errors: | |
type: string | |
required: | |
- errors | |
additionalProperties: false | |
errors: | |
type: object | |
properties: | |
errors: | |
type: array | |
properties: | |
message: | |
type: string | |
required: | |
- message | |
required: | |
- errors | |
servers: | |
- url: https://{defaultHost} | |
variables: | |
defaultHost: | |
default: www.example.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment