Skip to content

Full Access API

src.coinspot.FullAccessAPIV2

__init__(api_key, api_secret)

Wrapper for the CoinSpot FullAccess API V2

Parameters:

Name Type Description Default
api_key str

your CoinSpot FullAccess API Key

required
api_secret str

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'}

coin_deposit_address(coin, nonce=None)

Return the deposit address for {coin}

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ 'status':'ok', 'message':'ok', 'networks': [ {'name': 'BEP2', 'network': 'BNB', 'address': 'xxxxxxxxxxxxxxxxxxxxxxxxxxx', 'memo': '123456'}, {'name': 'ERC20', 'network': 'ETH', 'address': 'xxxxxxxxxxxxxxxxxxxxxxxxxxx', 'memo': ''} ] }

quote_buy_now(coin, amount, amount_type, nonce=None)

Return a quote to buy {amount} of {coin}.

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
amount float

Amount to buy of {coin}

required
amount_type str

"coin" or "aud" - whether {amount} is coin amount or AUD amount

required
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{'status': 'ok', 'message': 'ok', 'rate': 1234}

quote_sell_now(coin, amount, amount_type, nonce=None)

Return a quote to sell {amount} of {coins}

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
amount float

Amount to buy of {coin}

required
amount_type str

"coin" or "aud" - whether {amount} is coin amount or AUD amount

required
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{'status': 'ok', 'message': 'ok', 'rate': 1234}

quote_swap_now(coin_to_sell, coin_to_buy, amount, nonce=None)

Return a quote to swap {amount} of {coin_to_sell} for {coin_to_buy}

Parameters:

Name Type Description Default
coin_to_sell str

Coin short name, eg. BTC, ETH, LTC

required
coin_to_buy str

Coin short name, eg. BTC, ETH, LTC

required
amount float

Amount of {coin_to_sell} to sell

required
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{'status': 'ok', 'message': 'ok', 'rate': 1234}

market_buy_order(coin, amount, rate, market_type='AUD', nonce=None)

Place a market buy order for {amount} of {coin} at {rate}

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
amount float

Amount of {coin} to buy, max precision 8 decimal places

required
rate float

Rate in market currency (e.g. AUD or USDT) you are willing to pay, max precision 8 decimal places

required
market_type str

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

'AUD'
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "coin":"BTC", "market": "BTC/AUD", "amount":1.234 "rate":123.344 "id":"12345678901234567890" }

buy_now_order(coin, amount, amount_type, rate=None, threshold=None, direction='UP', nonce=None)

Place a buy now order for {amount} of {coin}. {amount} can be AUD or {coin}, determined by {amount_type}

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
amount float

Amount of {coin} to buy, max precision 8 decimal places

required
amount_type str

"coin" or "aud" - whether {amount} is coin amount or AUD amount

required
rate float

(optional) rate in AUD received from using quote_buy_now or otherwise

None
threshold float

(optional) 0 to 1000 - buy request will terminate if not within percentage threshold for current rate to vary from submitted rate, max precision for percentage is 8 decimal places

None
direction str

(optional) UP, DOWN, or BOTH - direction the price has moved for the percentage threshold to apply

'UP'
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "coin":"BTC", "amount":1.234, "market":"BTC/AUD", "total": 10.234 }

market_sell_order(coin, amount, rate, market_type='AUD', nonce=None)

Place a market sell order for {amount} of {coin} at {rate}

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
amount float

Amount of {coin} to sell, max precision 8 decimal places

required
rate float

rate in AUD you are willing to sell for, max precision 8 decimal places

required
market_type str

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

'AUD'
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "coin":"BTC", "market": "BTC/AUD", "amount":1.234, "rate":123.344, "id":"12345678901234567890" }

sell_now_order(coin, amount, amount_type, rate=None, threshold=None, direction='DOWN', nonce=None)

Place a sell now order for {amount} of {coin}. {amount} can be AUD or {coin}, determined by {amount_type}

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
amount float

Amount of {coin} to buy, max precision 8 decimal places

required
amount_type str

"coin" or "aud" - whether {amount} is coin amount or AUD amount

required
rate float

(optional) rate in AUD received from using Sell Now Quote or otherwise

None
threshold float

(optional) 0 to 1000 - sell request will terminate if not within percentage threshold for current rate to vary from submitted rate, max precision for percentage is 8 decimal places

None
direction str

(optional) UP, DOWN, or BOTH - direction the price has moved for the percentage threshold to apply

'DOWN'
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "coin":"BTC", "amount":1.234, "rate":3.234, "market":"BTC/AUD", "total": 10.234 }

swap_now_order(coin_to_sell, coin_to_buy, amount, rate=None, threshold=None, direction='BOTH', nonce=None)

Place a swap order to swap {amount} of {coin_to_sell} for {coin_to_buy}

Parameters:

Name Type Description Default
coin_to_sell str

Coin short name, eg. BTC, ETH, LTC

required
coin_to_buy str

Coin short name, eg. BTC, ETH, LTC

required
amount float

Amount of {coin_to_sell} to swap

required
rate float

(optional) rate received from using Swap Now Quote or otherwise

None
threshold float

(optional) 0 to 1000 - swap request will terminate if not within percentage threshold for current rate to vary from submitted rate, max precision for percentage is 8 decimal places

None
direction str

(optional) UP, DOWN, or BOTH - direction the price has moved for the percentage threshold to apply

'BOTH'
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "coin":"BTC", "amount":1.234, "rate":3.234, "market":"BTC/ETH", "total": 10.234 }

cancel_buy_order(order_id, nonce=None)

Cancel open Buy Order

Parameters:

Name Type Description Default
order_id str

ID of order to cancel

required
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok" }

cancel_sell_order(order_id, nonce=None)

Cancel open Sell Order

Parameters:

Name Type Description Default
order_id str

ID of order to cancel

required
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok" }

get_coin_withdrawal_details(coin, nonce=None)

Get list of networks that {coin} can be sent over

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok", "networks": [ { "network": "BNB", "paymentid": "no", "fee": 0.001, "minsend": 0.00001, default: false}, { "network": "BSC", "paymentid": "optional", "fee": 0.002, "minsend": 0.00001, default: false}, { "network": "ETH", "paymentid": "no", "fee":0.003, "minsend": 0.00001, default: true}, ] }

coin_withdrawal(coin, amount, address, require_email_confirmation='NO', network=None, payment_id=None, nonce=None)

Transfer {amount} of {coin} to {address} using {network}

Parameters:

Name Type Description Default
coin str

Coin short name, eg. BTC, ETH, LTC

required
amount float

the amount (in coin currency) of coin you would like to transfer

required
address str

the destination address for the coin amount

required
require_email_confirmation str

(optional) if 'YES' an email confirmation will be sent and withdraw will not complete until confirmation link within email is clicked, values: 'YES', 'NO'

'NO'
network str

(optional) - network you would like to send using e.g. 'BNB', 'ETH' - None for 'default' network

None
payment_id str

(optional) - the appropriate payment id/memo for the withdrawal where permitted

None
nonce int

(optional) Nonce. See the docs for more detail

None

Returns:

Type Description
dict

{ "status":"ok", "message":"ok" }