Skip to main content

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


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)

Uploaded Source

Built Distribution

coin_falcon-0.0.3-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page