Skip to content

Instantly share code, notes, and snippets.

@thomasdavis
Last active July 12, 2019 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasdavis/ea70769d71c6392679fbd3cdcb1ed1e6 to your computer and use it in GitHub Desktop.
Save thomasdavis/ea70769d71c6392679fbd3cdcb1ed1e6 to your computer and use it in GitHub Desktop.
asdasd
openapi: '3.0.0'
info:
version: 1.0.0
title: BlockBid API Gateway
license:
name: MIT
servers:
- url: https://api.blockbid.io
paths:
/healthz:
get:
description: Gets the health of the server
responses:
200:
description: Server up time in seconds
content:
application/json:
schema:
$ref: '#/components/schemas/Healthz'
/api_keys:
get:
description: Get a list of API keys
responses:
200:
description: A list of API keys
content:
application/json:
schema:
$ref: '#/components/schemas/APIKeys'
post:
description: Get api key for account
requestBody:
description: otpCode and scope of keys
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyGen'
responses:
200:
description: Status of submission
content:
application/json:
schema:
type: object
properties:
key:
type: string
example: '010f5898-c88d-4b5c-bb34-192e6f718d94'
description: User Api auth key
secret:
type: string
example: '6SbyMVroHzkBd3cYWx1PJFS3f3zGUey5i7UF6vwucJxRRMHqtMMHZe+D/6lYNHRsnVL82j+PItj/lV8h/a8YWA=='
description: HMAC secret.
/markets:
get:
description: List all markets
operationId: listMarkets
responses:
200:
description: A paged array of markets
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Markets'
/markets/{id}:
get:
description: List single market
parameters:
- name: id
in: path
description: Market ID
required: true
schema:
type: string
example: btcaud
responses:
200:
description: A paged array of markets
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Markets'
/addresses:
get:
description: Get addresses of an account
parameters:
- name: currency
in: query
description: Currency you wish to get the address for.
required: true
schema:
type: string
example: btc
responses:
200:
description: An object containing the requested currency and its corresponding address.
content:
application/json:
schema:
$ref: '#/components/schemas/Addresses'
/auth:
get:
description: Gets the login status of user.
responses:
200:
description: The user is successfully logged in
content:
application/json:
schema:
$ref: '#/components/schemas/AuthStatusRes'
post:
description: Logs the user in and creates a session.
requestBody:
description: Login credentials of the user
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Auth'
responses:
200:
description: The user is successfully logged out
delete:
description: Clears user session, logging them out
responses:
200:
description: Object containing the login status of the user.
content:
application/json:
schema:
$ref: '#/components/schemas/AuthStatusRes'
/deposits/fiat:
get:
description: Get all fiat deposits for a user
parameters:
- name: currency
in: query
description: Currency you wish to search deposits for.
required: false
schema:
type: string
example: btc
- name: limit
in: query
description: Set the result limit.
required: false
schema:
type: integer
example: 10
- name: state
in: query
description: Filter orders by state
required: false
schema:
type: string
example: accepted
responses:
200:
description: Array containing the requested deposits.
content:
application/json:
schema:
$ref: '#/components/schemas/FiatDeposits'
/deposits/crypto:
get:
description: Get all crypto deposits for a user
parameters:
- name: currency
in: query
description: Currency you wish to search deposits for.
required: true
schema:
type: string
example: btc
- name: limit
in: query
description: Set the result limit.
required: false
schema:
type: integer
example: 10
- name: state
in: query
description: Filter orders by state
required: false
schema:
type: string
example: accepted
responses:
200:
description: Array containing the requested deposits.
content:
application/json:
schema:
$ref: '#/components/schemas/CryptoDeposits'
/mfa/totp:
get:
description: Generates a qr code
responses:
200:
description: QR Code that has been generated.
content:
application/json:
schema:
$ref: '#/components/schemas/QrCodeRes'
post:
description: Enables mfa on account.
requestBody:
description: mfa 6 digit code as given by authenticator app
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/mfa'
responses:
200:
description: Status of submission
put:
description: Verify mfa on account.
requestBody:
description: mfa 6 digit code as given by authenticator app
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/mfa'
responses:
200:
description: Status of submission
/mfa/totp/disable:
post:
description: Disable mfa on account.
requestBody:
description: mfa 6 digit code as given by authenticator app
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/mfa'
responses:
200:
description: Status of submission
/trade_volume:
get:
description: Gets a list of tickers for all markets
parameters:
- name: quoteCurrency
in: query
description: Quote currency you would like to receive volume changes for
required: false
schema:
type: string
example: btc
responses:
200:
description: Market Tickers
content:
application/json:
schema:
$ref: '#/components/schemas/TradeVolumes'
/tickers:
get:
description: Gets a list of tickers for all markets
responses:
200:
description: Market Tickers
content:
application/json:
schema:
$ref: '#/components/schemas/TickersArrRes'
/tickers/{id}:
parameters:
- name: id
in: path
description: Ticker Id.
required: true
schema:
type: string
example: btcaud
get:
description: Gets a list of tickers for all markets
responses:
200:
description: Market Tickers
content:
application/json:
schema:
$ref: '#/components/schemas/TickersArrRes'
/withdraws/crypto:
get:
description: Gets a list of all withdraws for the user
parameters:
- name: currency
in: query
description: Currency you wish to search your withdraws for.
required: false
schema:
type: string
example: btc
- name: page
in: query
description: Page number (defaults to 1).
required: false
schema:
type: integer
example: 1
- name: limit
in: query
description: Number of withdraws per page (defaults to 100, maximum is 1000).
required: false
schema:
type: integer
example: 10
responses:
200:
description: An array containing the users withdraws.
content:
application/json:
schema:
$ref: '#/components/schemas/CryptoWithdraws'
post:
description: Creates a new withdraw on the server
requestBody:
description: Creates a new withdraw on the server
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCryptoWithdraw'
responses:
200:
description: An object containing the users submitted withdraw.
content:
application/json:
schema:
$ref: '#/components/schemas/CryptoWithdraw'
/withdraws/fiat:
get:
description: Gets a list of all withdraws for the user
parameters:
- name: currency
in: query
description: Currency you wish to search your withdraws for.
required: true
schema:
type: string
example: btc
- name: page
in: query
description: Page number (defaults to 1).
required: false
schema:
type: integer
example: 1
- name: limit
in: query
description: Number of withdraws per page (defaults to 100, maximum is 1000).
required: false
schema:
type: integer
example: 10
responses:
200:
description: An array containing the users withdraws.
content:
application/json:
schema:
$ref: '#/components/schemas/FiatWithdraws'
post:
description: Creates a new withdraw on the server
requestBody:
description: Creates a new withdraw on the server
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateFiatWithdraw'
responses:
200:
description: An object containing the users submitted withdraw.
content:
application/json:
schema:
$ref: '#/components/schemas/WithdrawSubmitObjRes'
/balances:
get:
description: Get's a list of users balances.
responses:
200:
description: An array containing the users balances.
content:
application/json:
schema:
$ref: '#/components/schemas/Balances'
/balances/{currency}:
get:
description: Get the details of a users single balance.
parameters:
- name: currency
in: path
description: Currency you wish to view an account for.
required: true
schema:
type: string
example: btc
responses:
200:
description: An object containing the selected balance information.
content:
application/json:
schema:
$ref: '#/components/schemas/Balance'
/ohlc:
get:
description: view the bucketed trade history.
parameters:
- name: market
in: query
description: name of market
required: true
schema:
type: string
- name: limit
in: query
description: Limit the number of returned data points. Default to 30.
required: false
schema:
type: integer
- name: period
in: query
description: Interval between data points, default to 1 (minute). You can choose between 1, 5, 15, 30, 60, 120, 240, 360, 720, 1440, 4320, 10080.
required: false
schema:
type: integer
- name: timestamp
in: query
description: Timestamp integer. If set, only data periods after this time will be displayed.
required: false
schema:
type: integer
responses:
200:
description: An object containing the selected account information.
content:
application/json:
schema:
$ref: '#/components/schemas/OHLC'
/orderbook:
get:
description: Gets the orderbook for the exchange
parameters:
- name: market
in: query
description: name of market
required: true
schema:
type: string
- name: asks_limit
in: query
description: Limit the number of returned asks. Default to 20.
required: false
schema:
type: integer
- name: bids_limit
in: query
description: Limit the number of returned bids. Default to 20.
required: false
schema:
type: integer
responses:
200:
description: An object containing the orderbook for the specified market.
content:
application/json:
schema:
$ref: '#/components/schemas/OrderbookObjMainRes'
/orders:
get:
description: Get's the list of all your orders
parameters:
- name: market
in: query
description: name of market
schema:
type: string
example: btcaud
- name: state
in: query
description: Filter orders by state
required: false
schema:
type: string
example: waiting
- name: limit
in: query
description: Limit number of orders returned
required: false
schema:
type: integer
example: 5
- name: page
in: query
description: specify the page of paginated results
required: false
schema:
type: integer
example: 1
- name: order_by
in: query
description: ascending or descending order, default is ascending
required: false
schema:
type: string
example: desc
responses:
200:
description: Array containing the users orders.
content:
application/json:
schema:
$ref: '#/components/schemas/ArrayOrdersRes'
post:
description: Creates orders on the exchange
requestBody:
description: Data containing order information such as market, side, price etc..
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrder'
responses:
200:
description: Array containing the users orders.
content:
application/json:
schema:
$ref: '#/components/schemas/ArrayOrdersRes'
delete:
description: cancel all open orders
responses:
200:
description: Array containing the users cancelled orders.
content:
application/json:
schema:
$ref: '#/components/schemas/ArrayOrdersRes'
/orders/{id}:
get:
description: get order based on specific order id
parameters:
- name: id
in: path
description: ID of order
required: true
schema:
type: integer
example: 12345
format: int64
responses:
200:
description: Object containing the users selected order.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjOrderRes'
delete:
description: Cancel a specific order based on id
parameters:
- name: id
in: path
description: ID of order
required: true
schema:
type: integer
example: 12345
format: int64
responses:
200:
description: Object Containing the users cancelled order.
content:
application/json:
schema:
$ref: '#/components/schemas/ObjOrderRes'
/trades:
get:
description: View the trade history of the exchange.
parameters:
- name: market
in: query
description: market to select
required: true
schema:
type: string
- name: limit
in: query
description: Limit the number of returned trades. Defaults to 50.
required: false
schema:
type: integer
- name: timestamp
in: query
description: An integer representing the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.
required: false
schema:
type: integer
- name: from
in: query
description: tradeID. If this is set, then only trades after the trade ID will be returned.
required: false
schema:
type: integer
- name: to
in: query
description: tradeID. If this is set, then only trades before the trade ID will be returned.
required: false
schema:
type: integer
- name: order_by
in: query
description: If set, will sort trades in ascending or descending order, defaults to 'desc'.
required: false
schema:
type: string
responses:
200:
description: Array containing the trade history of the selected market.
content:
application/json:
schema:
$ref: '#/components/schemas/TradesArrRes'
/currencies:
get:
description: Gets currency information
responses:
200:
description: Currency
content:
application/json:
schema:
$ref: '#/components/schemas/CurrencyArray'
/currencies/{id}:
get:
description: Gets currency information
parameters:
- name: id
in: path
description: The currency id
required: true
schema:
type: string
example: btc
responses:
200:
description: Currency
content:
application/json:
schema:
$ref: '#/components/schemas/CurrencyArray'
/trades/my:
get:
description: View your own trade history
parameters:
- name: market
in: query
description: market to select
required: false
schema:
type: string
- name: limit
in: query
description: Limit the number of returned trades. Defaults to 50.
required: false
schema:
type: integer
- name: timestamp
in: query
description: An integer representing the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.
required: false
schema:
type: integer
- name: from
in: query
description: tradeID. If this is set, then only trades after the trade ID will be returned.
required: false
schema:
type: integer
- name: to
in: query
description: tradeID. If this is set, then only trades before the trade ID will be returned.
required: false
schema:
type: integer
- name: startTime
in: query
description: tradeID. If this is set, then only trades after the trade ID will be returned.
required: false
schema:
type: string
- name: endTime
in: query
description: tradeID. If this is set, then only trades before the trade ID will be returned.
required: false
schema:
type: string
- name: order_by
in: query
description: If set, will sort trades in ascending or descending order, defaults to 'desc'.
required: false
schema:
type: string
responses:
200:
description: Array containing the trade history of the selected market.
content:
application/json:
schema:
$ref: '#/components/schemas/TradesMyArrRes'
/trades/my/all:
get:
description: View your own trade history
parameters:
- name: limit
in: query
description: Limit the number of returned trades. Defaults to 50.
required: false
schema:
type: integer
- name: timestamp
in: query
description: An integer representing the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.
required: false
schema:
type: integer
- name: from
in: query
description: tradeID. If this is set, then only trades after the trade ID will be returned.
required: false
schema:
type: integer
- name: to
in: query
description: tradeID. If this is set, then only trades before the trade ID will be returned.
required: false
schema:
type: integer
- name: order_by
in: query
description: If set, will sort trades in ascending or descending order, defaults to 'desc'.
required: false
schema:
type: string
responses:
200:
description: Array containing the trade history of the selected market.
content:
application/json:
schema:
$ref: '#/components/schemas/TradesMyAllTradesArrRes'
components:
schemas:
Auth:
required:
- email
- password
properties:
email:
type: string
password:
type: string
totpCode:
type: string
realIp:
type: string
mfa:
required:
- code
properties:
code:
type: string
NewUser:
required:
- email
- password
- accept_terms
properties:
email:
type: string
password:
type: string
accept_terms:
type: boolean
CreateOrder:
required:
- market
- orders
properties:
market:
description: The market to place order on.
type: string
example: btcaud
orders:
description: Array of orders.
type: array
items:
$ref: '#/components/schemas/OrderCreation'
OrderCreation:
type: object
properties:
side:
type: string
example: buy
description: Side that you want to place the order on.
volume:
type: string
example: 1.234
description: Amount of base currency you wish to buy / sell.
price:
type: string
example: 3500
description: If placing limit order, select price to place order.
orderType:
type: string
example: limit
description: Select type of order. Defaults to 'limit'.
Balances:
type: array
items:
$ref: '#/components/schemas/Balance'
Balance:
type: object
properties:
currency:
type: string
example: btc
description: The currency of the account
total:
type: number
example: 2.463
description: The total balance of the account
locked:
type: number
example: 1.232
description: The locked or unavailable balance of the account.
available:
type: number
example: 1.232
description: The available balance of the account.
Addresses:
type: array
items:
$ref: '#/components/schemas/Address'
Address:
type: object
properties:
currency:
type: string
example: btc
description: Currency that you selected in your query.
address:
type: string
example: '4MsvavbaybYfsRyK8h665LYqHy5MqP1HRc9'
description: Deposit address of the selected currency.
AuthStatusRes:
type: object
properties:
auth:
type: boolean
example: true
description: Login status of user.
FiatDeposits:
type: array
items:
$ref: '#/components/schemas/FiatDeposit'
CryptoDeposits:
type: array
items:
$ref: '#/components/schemas/CryptoDeposit'
FiatDeposit:
type: object
properties:
id:
type: number
example: '1234'
description: The id of the deposit.
currency:
type: string
example: btc
description: The currency that has been deposited.
amount:
type: number
example: '1.3'
description: The amount of the currency that has been deposited.
fee:
type: number
example: '0.0'
description: The fee that has been processed on the deposit by Blockbid.
createdAt:
type: string
example: '2018-06-18T09:09:39+02:00'
description: Timestamp from when the deposit was requested.
completedAt:
type: string
example: '2018-06-18T09:09:39+02:00'
description: Timestamp from when the deposit was accepted.
state:
type: string
example: 'accepted'
description: The current state of the deposit.
CryptoDeposit:
type: object
properties:
id:
type: number
example: '1234'
description: The id of the deposit.
currency:
type: string
example: btc
description: The currency that has been deposited.
amount:
type: number
example: '1.3'
description: The amount of the currency that has been deposited.
fee:
type: number
example: '0.0'
description: The fee that has been processed on the deposit by Blockbid.
txid:
type: string
example: '7ea2a7197ae7a9eccd7bb3afeda947fb6936e2d951fa7d9b3ac604f2ecb9dc62'
description: The transaction ID of the wallet transfer.
createdAt:
type: string
example: '2018-06-18T09:09:39+02:00'
description: Timestamp from when the deposit was requested.
confirmations:
type: boolean
example: '2018-06-18T09:09:39+02:00'
description: Did the deposit succeed?
completedAt:
type: string
example: '3'
description: Blockchain confirmations that the deposit has received.
state:
type: string
example: 'accepted'
description: The current state of the deposit.
TickersArrRes:
type: array
items:
$ref: '#/components/schemas/TickersObjRes'
TickersObjRes:
type: object
properties:
market:
type: string
example: btcaud
description: The market of the ticker
last:
type: number
example: '1201.99'
description: The last price on the market.
timestamp:
type: string
example: '1531286564'
description: Timestamp for when the ticker was submitted.
vol24h:
type: number
example: '141432.54'
description: The 24 hour volume of the market.
OHLC:
type: array
items:
$ref: '#/components/schemas/OHLCTick'
OHLCTick:
type: object
properties:
timestamp:
type: string
example: '1529452800'
description: Timestamp for the OHLC interval.
open:
type: number
example: '10000'
description: Opening price of the OHLC interval.
high:
type: number
example: '11000'
description: Highest price of the OHLC interval.
low:
type: number
example: '9000'
description: Lowest price of the OHLC interval.
close:
type: number
example: '10500'
description: Closing price of the OHLC interval.
volume:
type: number
example: '20.32'
description: trade volume of the OHLC interval.
ArrayOrdersRes:
type: array
items:
$ref: '#/components/schemas/ObjOrderRes'
ObjOrderRes:
type: object
properties:
id:
type: number
example: '1234'
description: The id of order.
side:
type: string
example: buy
description: The side that the order was placed on.
orderType:
type: string
example: limit
description: The type of order.
price:
type: number
example: '4000'
description: The price that the order was submitted.
averagePrice:
type: number
example: '4000'
description: The average price the order is being executed at.
state:
type: string
example: btcaud
description: The state of the order
market:
type: string
example: btcaud
description: The market the order is on.
createdAt:
type: string
example: '2018-07-02T08:26:07+02:00'
description: The time that the order was submitted.
volume:
type: number
example: '0.5'
description: The size of the order.
remainingVolume:
type: number
example: '0.4'
description: The remaining volume of the order.
executedVolume:
type: number
example: '0.1'
description: The amount of the order which has already been matched.
tradesCount:
type: number
example: '2'
description: The number of trades that have been matched with the order.
OrderbookObjMainRes:
type: object
properties:
bids:
type: array
items:
$ref: '#/components/schemas/OrderbookObjBidRes'
asks:
type: array
items:
$ref: '#/components/schemas/OrderbookObjAskRes'
OrderbookObjBidRes:
type: object
properties:
price:
type: number
example: '6000'
description: The order price.
volume:
type: number
example: '0.03'
description: The order volume.
averagePrice:
type: number
example: '6000'
description: The average order price.
remainingVolume:
type: number
example: '0.03'
description: The remaining order volume.
OrderbookObjAskRes:
type: object
properties:
price:
type: number
example: '5000'
description: The order price.
volume:
type: number
example: '0.025'
description: The order volume.
averagePrice:
type: number
example: '6000'
description: The average order price.
remainingVolume:
type: number
example: '0.03'
description: The remaining order volume.
TradesMyArrRes:
type: array
items:
$ref: '#/components/schemas/TradesMyObjRes'
TradesMyAllTradesArrRes:
type: array
items:
$ref: '#/components/schemas/TradesMyAllObjRes'
APIKeys:
type: array
items:
$ref: '#/components/schemas/APIKey'
ApiKeyDelete:
type: object
properties:
id:
type: string
example: '010f5898-sss-4b5c-asdadas-192e6f718d94'
description: User Api auth key
APIKey:
type: object
properties:
key:
type: string
example: '010f5898-sss-4b5c-asdadas-192e6f718d94'
description: User Api auth key
createdAt:
type: string
example: 11/2121
description: Date the API key was created
scopes:
type: string
example: 'trade history'
description: Shows you what scopes you have created
TradesArrRes:
type: array
items:
$ref: '#/components/schemas/TradesObjRes'
TradesMyAllObjRes:
type: object
properties:
tradeId:
type: number
example: '1234'
description: The id of the trade.
orderId:
type: number
example: '12345'
description: The id of the order.
funds:
type: number
example: '10432.25'
description: The price that the trade was executed at.
price:
type: number
example: '10432.25'
description: The price that the trade was executed at.
volume:
type: number
example: '0.0123'
description: The volume (size) that was executed in the trade.
createdAt:
type: string
example: '2018-06-25T16:49:53+10:00'
description: The time that the trade was executed.
market:
type: string
example: 'buy'
description: The market that the trade was executed on.
side:
type: string
example: 'buy'
description: The side that the trade was executed on.
TradesMyObjRes:
type: object
properties:
id:
type: number
example: '1234'
description: The id of the trade.
orderId:
type: number
example: '12345'
description: The id of the order.
funds:
type: number
example: '10432.25'
description: The price that the trade was executed at.
price:
type: number
example: '10432.25'
description: The price that the trade was executed at.
volume:
type: number
example: '0.0123'
description: The volume (size) that was executed in the trade.
createdAt:
type: string
example: '2018-06-25T16:49:53+10:00'
description: The time that the trade was executed.
market:
type: string
example: 'buy'
description: The market that the trade was executed on.
side:
type: string
example: 'buy'
description: The side that the trade was executed on.
TradesObjRes:
type: object
properties:
id:
type: number
example: '1234'
description: The id of the trade.
funds:
type: number
example: '10432.25'
description: The price that the trade was executed at.
price:
type: number
example: '10432.25'
description: The price that the trade was executed at.
volume:
type: number
example: '0.0123'
description: The volume (size) that was executed in the trade.
createdAt:
type: string
example: '2018-06-25T16:49:53+10:00'
description: The time that the trade was executed.
market:
type: string
example: 'buy'
description: The market that the trade was executed on.
side:
type: string
example: 'buy'
description: The side that the trade was executed on.
QrCodeRes:
type: object
properties:
barcode:
type: string
example: Too Long to Write Out
description: Barcode for qr code.
url:
type: string
example: Also Too Long to Write Out
description: Url for qr code.
CryptoWithdraws:
type: array
items:
$ref: '#/components/schemas/CryptoWithdraw'
FiatWithdraws:
type: array
items:
$ref: '#/components/schemas/FiatWithdraw'
CreateFiatWithdraw:
type: object
properties:
currency:
type: string
example: usd
description: Currency of withdraw.
bankCode:
type: string
example: usd
description: Currency of withdraw.
amount:
type: number
example: '100.0'
description: Amount of currency that has been withdrawn.
totpCode:
type: number
example: '123456'
description: Multifactor Authentication Code.
FiatWithdraw:
type: object
properties:
id:
type: string
example: '1234'
description: The ID of the withdraw.
currency:
type: string
example: usd
description: Currency of withdraw.
bankCode:
type: string
example: usd
description: Currency of withdraw.
amount:
type: number
example: '100.0'
description: Amount of currency that has been withdrawn.
fee:
type: number
example: '0.003'
description: The withdraw fee.
state:
type: string
example: accepted
description: The state of the withdraw.
createdAt:
type: string
example: '2018-05-23T10:59:47+10:00'
description: Timestamp for when the withdraw was initially submitted.
CreateCryptoWithdraw:
type: object
properties:
address:
type: string
example: usd
description: Currency of withdraw.
currency:
type: string
example: usd
description: Currency of withdraw.
amount:
type: number
example: '100.0'
description: Amount of currency that has been withdrawn.
totpCode:
type: string
example: '123456'
description: Multifactor authentication code.
CryptoWithdraw:
type: object
properties:
id:
type: string
example: '1234'
description: The ID of the withdraw.
currency:
type: string
example: usd
description: Currency of withdraw.
amount:
type: number
example: '100.0'
description: Amount of currency that has been withdrawn.
fee:
type: number
example: '0.003'
description: The withdraw fee.
txid:
type: string
example: notApplicable
description: The blockchain transaction id.
address:
type: string
example: '1'
description: The recipient account address.
state:
type: string
example: accepted
description: The state of the withdraw.
createdAt:
type: string
example: '2018-05-23T10:59:47+10:00'
description: Timestamp for when the withdraw was initially submitted.
WithdrawSubmitObjRes:
type: object
properties:
id:
type: string
example: IFA4324fDSFA
description: The transaction id
currency:
type: string
example: usd
description: Currency of withdraw.
currencyType:
type: string
example: fiat
description: Currency type of withdraw.
amount:
type: string
example: '100.0'
description: Amount of currency that has been withdrawn.
fee:
type: string
example: '0.003'
description: The withdraw fee.
bankCode:
type: string
example: '1'
description: The recipient account address.
state:
type: string
example: accepted
description: The state of the withdraw.
createdAt:
type: string
example: '2018-05-23T10:59:47+10:00'
description: Timestamp for when the withdraw was initially submitted.
KYC:
type: object
required:
- accountName
properties:
uid:
type: string
example: '123'
description: User ID
RefDataBankCodeTypes:
type: object
properties:
id:
type: string
example: IFA4324fDSFA
description: Unique Id
countryId:
type: string
example: Japan
description: id of country.
bankCode:
type: string
example: JPN
description: bank code type.
NoSessionTokenError:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Sorry, You need to be logged in to do that...
description: Message describing the error
name:
type: string
example: no_session_token
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
AccountUnverified:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Sorry, you need to complete account verification before making this request.
description: Message describing the error
name:
type: string
example: account_unverified
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
MarketsUnavailable:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't get markets at this current time. Please try again later.
description: Message describing the error
name:
type: string
example: markets_unavailable
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
CurrencyInvalid:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: The currency you have entered is invalid. Please enter a valid currency.
description: Message describing the error
name:
type: string
example: currency_invalid
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewAddressFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't get address at this current time.
description: Message describing the error
name:
type: string
example: view_address_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
DepositNotFound:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't find the deposit you requested, please check the id and try again
description: Message describing the error
name:
type: string
example: deposit_not_found
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewDepositsFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't get deposits, please try again later.
description: Message describing the error
name:
type: string
example: view_deposits_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
TickersUnavailable:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't get tickers at this current time. Please try again later.
description: Message describing the error
name:
type: string
example: tickers_unavailable
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
BalanceInvalid:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: We cannot find the account you have queried for.
description: Message describing the error
name:
type: string
example: account_invalid
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewBalanceFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: We cannot retrieve your accounts at this current time, please try again later.
description: Message describing the error
name:
type: string
example: view_accounts_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewOHLCFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Unable to get OHLC at this current time. Please try again shortly.
description: Message describing the error
name:
type: string
example: view_ohlc_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewOrderbookFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Unable to get orderbook at this current time , please try again shortly.
description: Message describing the error
name:
type: string
example: view_orderbook_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewOrderFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: We were unable to get your order at this time. Please try again shortly.
description: Message describing the error
name:
type: string
example: view_order_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
OrderFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: We were unable to place your order at this time. Please ensure you have sufficient funds and try again shortly.
description: Message describing the error
name:
type: string
example: order_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
CancelFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: We were unable to cancel your order at this time. Please try again shortly.
description: Message describing the error
name:
type: string
example: cancellation_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewTradesFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Unable to get trades at this moment, please try again shortly.
description: Message describing the error
name:
type: string
example: view_trades_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewWithdrawFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't get withdraws at this moment. Please try again later.
description: Message describing the error
name:
type: string
example: view_withdraw_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewAccountsFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: We cannot get accounts at this time, please try again later.
description: Message describing the error
name:
type: string
example: view_accounts_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
UpdateAccountFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: We cannot update account at this time, please try again later.
description: Message describing the error
name:
type: string
example: update_account_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
CreateAccountFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: We cannot create account at this time, please try again later.
description: Message describing the error
name:
type: string
example: create_account_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
DeleteAccountFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: We cannot delete account at this time, please try again later.
description: Message describing the error
name:
type: string
example: delete_account_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ExpiredToken:
type: object
properties:
error:
type: object
properties:
message:
type: string
description: Message describing the error
name:
type: string
example: expired_token
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
PhoneNumberInvalid:
type: object
properties:
error:
type: object
properties:
message:
type: string
description: Message describing the error
name:
type: string
example: phone_number_invalid
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
PhoneNumberAlreadyExists:
type: object
properties:
error:
type: object
properties:
message:
type: string
description: Message describing the error
name:
type: string
example: phone_number_already_exists
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
PhoneNumberEmptyParams:
type: object
properties:
error:
type: object
properties:
message:
type: string
description: Message describing the error
name:
type: string
example: phone_number_empty_params
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
InvalidPhoneRecord:
type: object
properties:
error:
type: object
properties:
message:
type: string
description: Message describing the error
name:
type: string
example: invalid_phone_record
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewMembersFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't get members at this moment. Please try again later.
description: Message describing the error
name:
type: string
example: view_members_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewOrdersFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't get orders at this moment. Please try again later.
description: Message describing the error
name:
type: string
example: view_orders_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
CreateDepositFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't despoit amount at this moment. Please try again later.
description: Message describing the error
name:
type: string
example: create_deposit_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
UpdateDepositFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't despoit amount at this moment. Please try again later.
description: Message describing the error
name:
type: string
example: update_deposit_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
CreateWithdrawFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't despoit amount at this moment. Please try again later.
description: Message describing the error
name:
type: string
example: create_withdraw_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
UpdateWithdrawFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't despoit amount at this moment. Please try again later.
description: Message describing the error
name:
type: string
example: update_withdraw_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
ViewWalletsFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't get wallets at this moment. Please try again later.
description: Message describing the error
name:
type: string
example: view_wallets_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
SuspendMemberFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't suspend member, please try again later.
description: Message describing the error
name:
type: string
example: suspend_member_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
UnSuspendMemberFailed:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: Couldn't unsuspend member, please try again later.
description: Message describing the error
name:
type: string
example: unsuspend_member_failed
description: Summary code of error
time_thrown:
type: string
example: '2018-07-08T23:44:16.538Z'
description: Timestamp of when the error was thrown
data:
type: object
example: '{}'
description: Additional Information regarding the error
WithdrawDeprecated:
required:
- currency
- amount
- address
properties:
address:
type: string
example: 2MypSPPPNUZW6wsLjMzqMXAzWwewCdZ9eVw
description: The address of the wallet you want to send to
currency:
type: string
example: btc
description: The name of the currency.
amount:
type: string
example: 0.0001
description: The amount you want to send to another address
Market:
type: object
required:
- id
- name
properties:
id:
type: string
example: btcaud
description: The id of the market.
name:
type: string
example: BTC/USD
description: The name of the market.
Markets:
type: array
items:
$ref: '#/components/schemas/Market'
Error:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
ApiKeyGen:
required:
- totpCode
properties:
totpCode:
type: string
scopes:
type: string
Healthz:
type: object
properties:
uptime:
type: number
example: '121'
description: Server up time in seconds
CurrencyArray:
type: array
items:
$ref: '#/components/schemas/Currency'
Currency:
type: object
properties:
id:
type: string
example: btc
description: The currency id.
symbol:
type: string
example: ฿
description: The currency symbol
type:
type: string
example: coin
description: Either coin or fiat
precision:
type: integer
example: 8
description: How many decimal places to display
TradeVolumes:
type: array
items:
$ref: '#/components/schemas/TradeVolume'
TradeVolume:
type: object
properties:
price:
type: number
example: aud
description: The market of the ticker
volume:
type: number
example: aud
description: The market of the ticker
change:
type: string
example: aud
description: The market of the ticker
currency:
type: string
example: aud
description: The market of the ticker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment