Skip to content

Read Only API

src.coinspot.ReadOnlyAPIV2

__init__(api_key, api_secret)

Wrapper for the CoinSpot ReadOnly API V2

Parameters:

Name Type Description Default
api_key str

is your CoinSpot ReadOnly API Key

required
api_secret str

is the Secret associated with the provided API key

required

status(nonce=None)

Return the status of the CoinSpot API.

Parameters:

Name Type Description Default
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{"status":"ok"}

public_open_market_orders(coin, market_type=None, nonce=None)

Return a list of the top 20 public open buy and sell market orders

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
market_type str

(optional, available markets only, default 'AUD') market coin short name, example values 'AUD', 'USDT'

None
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "buyorders":[ { "amount":0.0001, "rate":111111, "total":0.1, "coin":"BTC", "market": "BTC/AUD" }, { "amount":0.001, "rate":11111111, "total":0.01, "coin":"BTC", "market": "BTC/AUD" } ], "sellorders":[ { "amount":0.0001, "rate":111111, "total":1, "coin":"BTC", "market": "BTC/AUD" }, { "amount":0.0001855, "rate":11111, "total":2, "coin":"BTC", "market": "BTC/AUD" } ] }

public_completed_market_orders(coin, market_type=None, start_date=None, end_date=None, limit=200, nonce=None)

Return a list of public completed buy and sell market orders

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
market_type str

(optional, available markets only, default 'AUD') market coin short name, example values 'AUD', 'USDT'

None
start_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
end_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
limit int

(optional) max 500 records

200
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "buyorders":[ { "amount":0.0001, "rate":111111, "total":0.1, "coin":"BTC", "market": "BTC/AUD", "solddate":"2020-05-21T13:22:45.000Z" }, { "amount":0.001, "rate":11111111, "total":0.01, "coin":"BTC", "market": "BTC/USDT", "solddate":"2020-05-21T13:22:45.000Z" } ], "sellorders":[ { "amount":0.0001, "rate":111111, "total":1, "coin":"BTC", "market": "BTC/AUD", "solddate":"2020-05-21T13:22:45.000Z" }, { "amount":0.0001855, "rate":11111, "total":2, "coin":"BTC", "market": "BTC/USDT", "solddate":"2020-05-21T13:22:45.000Z" } ] }

wallet_balance(coin=None, nonce=None)

Return the balance of the specified wallet, or all non-empty wallets

Parameters:

Name Type Description Default
coin str

Optional coin short name, eg. BTC, ETH, LTC. If None, returns a list of balances for all of your wallets

None
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "balances":[ { "AUD":{ "balance":1000.11, "audbalance":1000.11, "rate":1 } }, { "BTC":{ "balance":1.1111111, "audbalance":2222.22, "rate":111111.11 } }, { "LTC":{ "balance":111.111111, "audbalance":22222.22, "rate":11.1111 } }] }

open_market_orders(coin=None, market_type=None, nonce=None)

Return a list of your open market orders

Parameters:

Name Type Description Default
coin str

(optional) coin short name, eg. BTC, ETH, LTC. if None, returns open market orders for all coins

None
market_type str

(optional, available markets only, default 'AUD') market coin short name, example values 'AUD', 'USDT' if None, returns open market orders for all markets

None
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "buyorders":[ { "id": "1f1f1f1f1d1d1d1d1d1d1d1d", "coin":"STRAT", "market":"STRAT/AUD", "amount":111.1111, "created":"2020-05-21T13:22:45.000Z", "rate":45.11111, "total":444444 }, { "id": "1f1f1f1f1d1d1d1d1d1d1d1d", "coin":"STRAT", "market":"STRAT/USDT", "amount":111.1111, "created":"2020-05-21T13:22:45.000Z", "rate":45.11111, "total":444444 }] "sellorders":[ { "id": "1f1f1f1f1d1d1d1d1d1d1d1d", "coin":"STRAT", "market":"STRAT/AUD", "amount":111.1111, "created":"2020-05-21T13:22:45.000Z", "rate":45.11111, "total":444444 }, { "id": "1f1f1f1f1d1d1d1d1d1d1d1d", "coin":"STRAT", "market":"STRAT/USDT", "amount":111.1111, "created":"2020-05-21T13:22:45.000Z", "rate":45.11111, "total":444444 }} ] }

open_limit_orders(coin=None, nonce=None)

Return a list of your open limit orders

Parameters:

Name Type Description Default
coin str

(optional) coin short name, eg. BTC, ETH, LTC. if None, returns open limit orders for all coins

None
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "buyorders":[ { "id": "1f1f1f1f1d1d1d1d1d1d1d1d", "coin": "STRAT", "market":"STRAT/AUD", "rate": 111.111 "amount":111.1111, "created":"2020-05-21T13:22:45.000Z", "type": "buy stop" }, { "id": "1f1f1f1f1d1d1d1d1d1d1d1d", "coin": "STRAT", "market":"STRAT/AUD", "rate": 111.111 "amount":111.1111, "created":"2020-05-21T13:22:45.000Z", "type": "buy limit" }] "sellorders":[ { "id": "1f1f1f1f1d1d1d1d1d1d1d1d", "coin": "STRAT", "market":"STRAT/AUD", "rate": 111.111 "amount":111.1111, "created":"2020-05-21T13:22:45.000Z", "type": "stop loss" }, { "id": "1f1f1f1f1d1d1d1d1d1d1d1d", "coin": "STRAT", "market":"STRAT/AUD", "rate": 111.111 "amount":111.1111, "created":"2020-05-21T13:22:45.000Z", "type": "take profit" }} ] }

order_history(coin=None, market_type=None, start_date=None, end_date=None, limit=200, nonce=None)

Return a list of your past orders

Parameters:

Name Type Description Default
coin str

(optional) coin short name, eg. BTC, ETH, LTC. if None, returns past orders for all coins

None
market_type str

(optional, available markets only, default 'AUD') market coin short name, example values 'AUD', 'USDT' if None, returns past orders for all markets

None
start_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
end_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
limit int

(optional) max 500 records

200
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "buyorders":[ { "coin":"STRAT", "type":"market", "market":"STRAT/AUD", "rate":1222.33, "amount":111.1111, "total":222.2222, "solddate":"2020-05-21T13:22:45.000Z", "audfeeExGst":45.11111, "audGst":40.11111, "audtotal":444444 }, { "coin":"STRAT", "type":"instant", "otc":false, "market":"OMG/AUD", "rate":1222.33, "amount":333.33333, "total":222.2222, "solddate":"2020-05-21T13:22:45.000Z", "audfeeExGst":44.444444, "audGst":4.444444, "audtotal":5000 }] "sellorders":[ { "coin":"STRAT", "type":"market", "market":"STRAT/AUD", "rate":1222.33, "amount":111.1111, "total":222.2222, "solddate":"2020-05-21T13:22:45.000Z", "audfeeExGst":45.11111, "audGst":40.11111, "audtotal":444444 }, { "coin":"STRAT", "type":"instant", "otc":false, "market":"OMG/AUD", "rate":1222.33, "amount":333.33333, "total":222.2222, "solddate":"2020-05-21T13:22:45.000Z", "audfeeExGst":44.444444, "audGst":4.444444, "audtotal":5000 }] ] }

market_order_history(coin=None, market_type=None, start_date=None, end_date=None, limit=200, nonce=None)

Return a list of your past market orders

Parameters:

Name Type Description Default
coin str

(optional) coin short name, eg. BTC, ETH, LTC. if None, returns past market orders for all coins

None
market_type str

(optional, available markets only, default 'AUD') market coin short name, example values 'AUD', 'USDT' if None, returns open market orders for all markets

None
start_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
end_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
limit int

(optional) max 500 records

200
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "buyorders":[ { "coin":"STRAT", "market":"STRAT/AUD", "rate":1222.33, "amount":111.1111, "total":222.2222, "solddate":"2020-05-21T13:22:45.000Z", "audfeeExGst":45.11111, "audGst":40.11111, "audtotal":444444 }, { "coin":"STRAT", "market":"OMG/AUD", "rate":1222.33, "amount":333.33333, "total":222.2222, "solddate":"2020-05-21T13:22:45.000Z", "audfeeExGst":44.444444, "audGst":4.444444, "audtotal":5000 }] "sellorders":[ { "coin":"STRAT", "market":"STRAT/AUD", "rate":1222.33, "amount":111.1111, "total":222.2222, "solddate":"2020-05-21T13:22:45.000Z", "audfeeExGst":45.11111, "audGst":40.11111, "audtotal":444444 }, { "coin":"STRAT", "market":"OMG/AUD", "rate":1222.33, "amount":333.33333, "total":222.2222, "solddate":"2020-05-21T13:22:45.000Z", "audfeeExGst":44.444444, "audGst":4.444444, "audtotal":5000 }] ] }

send_receive_history(start_date=None, end_date=None, nonce=None)

Return a list of your past send/receive transactions

Parameters:

Name Type Description Default
start_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
end_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "sendtransactions":[ { "timestamp":"2020-05-21T13:22:45.000Z", "amount":1.111, "coin":"ETH", "address":"12345678901234567890", "aud": 0.123 }, { "timestamp":"2020-05-21T13:22:45.000Z", "amount":1111.11111, "coin":"RDD", "address":"12345678901234567890", "aud": 0.123 } ], "receivetransactions":[ { "timestamp":"2020-05-21T13:22:45.000Z", "amount":1.111, "coin":"ETH", "address":"12345678901234567890", "aud": 0.123 }, { "timestamp":"2020-05-21T13:22:45.000Z", "amount":1111.11111, "coin":"RDD", "address":"12345678901234567890", "aud": 0.123 } ] }

deposit_history(start_date=None, end_date=None, nonce=None)

Return a list of your past deposits

Parameters:

Name Type Description Default
start_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
end_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "deposits":[ { "amount":1111, "created":""2020-05-21T13:22:45.000Z", "status":"completed", "type":"POLi", "reference":"12345678901234567890" }, { "amount":2000, "created":"2020-05-21T13:22:45.000Z", "status":"completed", "type":"POLi", "reference":"12345678901234567890" } ] }

withdrawal_history(start_date=None, end_date=None, nonce=None)

Return a list of your past withdrawals

Parameters:

Name Type Description Default
start_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
end_date str

(optional) note: date is UTC date. format 'YYYY-MM-DD'

None
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "withdrawals":[ { "amount":10, "created":"2020-05-21T13:22:45.000Z", "status":"created" }, { "amount":20, "created":"2020-05-21T13:22:45.000Z", "status":"created" } ] }

affiliate_payment_history(nonce=None)

Return a list of affiliate payments you have received in the past

Parameters:

Name Type Description Default
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "payments":[ { "amount":111.1111, "month":"2020-05-21T13:22:45.000Z" }, { "amount":111.1111, "month":"2020-04-21T13:22:45.000Z" } ] }

referral_payment_history(nonce=None)

Return a list of referral payments you have received in the past

Parameters:

Name Type Description Default
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "payments":[ { "amount":111.1111, "coin":"BTC", "audamount":10, "timestamp":"2020-04-21T13:22:45.000Z" }, { "amount":222.22222, "coin":"BTC", "audamount":10, "timestamp":"2020-05-21T13:22:45.000Z" } ] }