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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file coin_falcon-0.0.3.tar.gz.

File metadata

  • Download URL: coin_falcon-0.0.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for coin_falcon-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ee57d59c5e24e476f1d49cdb09c81622915f56441cfcc64d4f209c557dc38ca7
MD5 5e0b34fada9d605a6625978c366df4f5
BLAKE2b-256 dcf6746a340850609d965fd202b247315a9cfe1f0593f57fa60a55fe910b6d05

See more details on using hashes here.

File details

Details for the file coin_falcon-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for coin_falcon-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e0c15edeb10ed574dbf41dab86429cd0d6e0dac3877a23e52e575f20ace721a6
MD5 e38e085eb0d6d99146c4ba7ec9b075a0
BLAKE2b-256 59553cb5a1b8841845e9b6b2c85ea7ca8c6054cad7e5b6c092c5146a21f468ad

See more details on using hashes here.

Supported by

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