Python package for the CoinFalcon API
Project description
CoinFalcon Python Package
The CoinFalcon Python Package provides convenient access to the CoinFalcon API from applications written in the Python language.
Usage
The client needs to be configured with your account's key and secret which is available in your CoinFalcon Dashboard:
API Client
from coin_falcon.client import Client
client = Client(key, secret)
It is also possible to set up an API endpoint and version:
client = Client(key, secret, endpoint)
Defaults:
ENDPOINT = 'https://coinfalcon.com'
VERSION = 1
Accounts
res = client.accounts()
print(res)
Create order
res = client.create_order({'market': 'ETH-BTC', 'operation_type': 'limit_order', 'order_type': 'buy', 'size': '0.01', 'price': '0.05'})
print(res)
Cancel order
res = client.cancel_order('547a730e-42b9-4dab-9abf-ed37b08a2947')
print(res)
List orders
res = client.my_orders()
print(res)
res = client.my_orders({'market': 'ETH-BTC'})
print(res)
List trades
res = client.my_trades({'market': 'ETH-BTC'})
print(res)
Deposit address
res = client.deposit_address('btc')
print(res)
Deposit history
res = client.deposit_history()
print(res)
Deposit details
res = client.deposit_details('bf6f203a-8f1c-4594-ae49-6c68ab804581')
print(res)
List orderbook
res = client.orderbook('ETH-BTC')
print(res)
res = client.orderbook('ETH-BTC', {'level': 3})
print(res)
Fees
res = client.fees()
print(res)
Withdrawal history
res = client.withdrawal_history()
print(res)
Create withdrawal
res = client.create_withdrawal({'currency': 'btc', 'address': '2N8hwP1WmJrFF5QWABn38y63uYLhnJYJYTF', 'amount': '0.1'})
print(res)
Withdrawal details
res = client.withdrawal_details('a2a70c40-cad3-46c7-bb4f-a6160de1eaf6')
print(res)
List market's trades
res = client.trades('ETH-BTC')
print(res)
Websocket Client
from coin_falcon.websocket_client import WebsocketClient
ws_client = WebsocketClient(key, secret)
Set up channels
ws_client.channels.append({ "command": "subscribe", "identifier": "{\"channel\":\"OrderbookChannel\",\"market\":\"ETH-BTC\"}" })
ws_client.channels.append({ "command": "subscribe", "identifier": "{\"channel\":\"UserTradesChannel\",\"market\":\"ETH-BTC\"}" })
Run feed
ws_client.feed()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
coin_falcon-0.0.3.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for coin_falcon-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0c15edeb10ed574dbf41dab86429cd0d6e0dac3877a23e52e575f20ace721a6 |
|
MD5 | e38e085eb0d6d99146c4ba7ec9b075a0 |
|
BLAKE2b-256 | 59553cb5a1b8841845e9b6b2c85ea7ca8c6054cad7e5b6c092c5146a21f468ad |