TheRockTrading API (1.0.0)

Download OpenAPI specification:Download

License: Apache-2.0

There are different groups of API: market, account, trading (of which margin trading is part of). Market (or "public") API are useful to get market data: ticker, orderbook, trades. Account API can be seen as user account personal data (balances, ATM withdraw..). Trading API can be used to operate on the market, by placing orders or cancelling them.

Use api.therocktrading.com as end point, not www.therocktrading.com.

Set header to Content-Type: application/json when POSTing. An HTTP 200 status (OK) will be returned in case of a successful call, usually with prominent informations of the object being created or updated.

Rate limiting

API calls are limited to 10 requests per second. Do not go over this limit or you will be blacklisted.

Authentication

trt_auth_key

The Api key is displayed on the list of your active api keys, under your personal page on the main therocktrading.com platform.

Security Scheme Type API Key
Header parameter name: X-TRT-KEY

trt_auth_sign

The signature is an HMAC-SHA512 hash of the nonce plus URL path (eg. "10294858483https://api.therocktrading.com/v1/transactions?currency=EUR", including parameters if any), encoded with the API secret key.

Security Scheme Type API Key
Header parameter name: X-TRT-SIGN

trt_auth_nonce

The nonce is a positive integer number that must increase with every request and it is included in the body. The best is to use a UNIX timestamp for each request.

Security Scheme Type API Key
Header parameter name: X-TRT-NONCE

account

Account API can be seen as user account personal data (balances, ATM withdraw..)

balance per currency

Get your balance in a specific currency

path Parameters
id
required
string

The currency you want your balance of.

Responses

Response samples

Content type
application/json
{
  • "currency": "string",
  • "balance": 0,
  • "trading_balance": 0
}

balances

With balances, you will get a list of all your balances in any currency.

Responses

Response samples

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

list all addresses per currency

Get user's addresses per currency

path Parameters
currency
required
string
Enum: "BTC" "LTC" "PPC" "ZEC" "ETH" "NOKU" "EURN" "FDZ"

The currency in object. Accepted currency values are BTC, LTC, PPC, ZEC, ETH, NOKU, EURN, FDZ

query Parameters
direction
string
Enum: "deposit" "withdraw"

filter addresses by direction. Accepted values are 'deposit' or 'withdraw'

network
string
Enum: "bitcoin" "litecoin" "peercoin" "dogecoin" "ethereum" "zcash" "bitcoin_cash" "liquid"

filter addresses by network. Accepted values are 'bitcoin', 'litecoin', 'peercoin', ethereum', 'zcash', 'bitcoin_cash', 'liquid'

bech32
boolean

filter addresses to get bech32 addresses only. Option accepted combined with 'BTC' currency only

transparent
boolean

filter addresses to get transparent addresses only. Option accepted combined with 'ZEC' currency only

private
boolean

filter addresses to get private addresses only. Option accepted combined with 'ZEC' currency only

unused
boolean

filter addresses in order to get yet used addresses. Option accepted combined with 'deposit' direction only

per_page
integer <int32>

number of addresses per page. default 25 max 200

page
integer <int32>

page number. default 1

Responses

Response samples

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

new deposit address

Submit a new address generation request for a currency. A new address request returns no data if succeeds. You can have up to 5 new addresses (not yet used) for each currency - address_type pair. This is valid for all accepted currencies except ethereum tokens (NOKU, EURN, FDZ, GUSD) where you can have up to 1 address per currency. Address generation is an async task. It takes a few seconds to complete, poll wallet list addresses API doc for new address generated.

path Parameters
currency
required
string
Enum: "BTC" "LTC" "PPC" "ZEC" "ETH" "NOKU" "EURN" "FDZ" "GUSD"

Currency for which you request a new address. Accepted currency values are BTC, LTC, PPC, ZEC, ETH, NOKU, EURN, FDZ, GUSD.

Request Body schema: application/json

A new address

network
string
Enum: "bitcoin" "litecoin" "peercoin" "dogecoin" "ethereum" "zcash" "bitcoin_cash" "liquid"

Network on which you are requesting a new address. Accepted values are 'bitcoin', 'litecoin', 'peercoin', ethereum', 'zcash', 'bitcoin_cash', 'liquid'

segwit
boolean

Set to true in order to request a segwit address generation [default]. Parameter accepted when combined with BTC currency only.

bech32
boolean

Set to true in order to request a bech32 address generation. Parameter accepted when combined with BTC currency only.

transparent
boolean

Set to true in order to request a transparent address generation [default]. Parameter accepted when combined with ZEC currency only.

private
boolean

Set to true in order to request a private address generation. Parameter accepted when combined with ZEC currency only.

confidential
boolean

Set to true in order to request a confidential address generation. Parameter accepted when combined with BTC currency and LIQUID network only.

Responses

Request samples

Content type
application/json
{
  • "network": "bitcoin",
  • "segwit": true,
  • "bech32": true,
  • "transparent": true,
  • "private": true,
  • "confidential": true
}

Response samples

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

show transaction

Show your transaction by ID

path Parameters
id
required
string

Operation ID

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "date": "2019-08-24T14:15:22Z",
  • "type": "string",
  • "price": 0,
  • "currency": "string",
  • "fund_id": 0,
  • "order_id": 0,
  • "trade_id": 0,
  • "note": "string",
  • "transfer_detail": {
    }
}

transactions

Get user's transactions

query Parameters
page
integer <int32>

page number. default 1

fund_id
string

filter transactions by fund symbol

currency
string

filter transactions by currency

after
string <date-time>

filter transactions after a certain timestamp ( format %Y-%m-%dT%H:%M:%S%Z ex. 2015-02-06T08:47:26Z )

before
string <date-time>

filter transactions before a certain timestamp ( format %Y-%m-%dT%H:%M:%S%Z ex. 2015-02-06T08:47:26Z )

type
string

filter transactions by transaction type

order_id
string

filter transactions by a specific order ID

trade_id
string

filter transactions by a specific trade ID

transfer_method
string
Enum: "wire_transfer" "ripple" "greenaddress" "bitcoin" "litecoin" "namecoin" "peercoin" "dogecoin"

filter transactions by transfer method. Accepted methods are: wire_transfer, ripple, greenaddress, bitcoin, litecoin, namecoin, peercoin, dogecoin

transfer_recipient
string

filter transactions by a specific recipient (e.g. Bitcoin address, IBAN)

transfer_id
string

filter transactions by a specific transfer ID (e.g. Bitcoin TX hash)

Responses

Response samples

Content type
application/json
{
  • "transactions": [