Query, trade and manage funds on Oceanex.
Project description
oceanex_py3 is a Python SDK to query, trade and manage funds on Oceanex.
Installation
pip3 install oceanex_py3
Source Code
Documentation
See /docs for detailed APIs.
Examples
Get all trading pairs supported on Oceanex.
from oceanex_py3 import public
markets = public.get_markets()
for each in markets:
print(each.identifier, each.left, each.right)
# etcusdt ETC USDT
# ltcusdt LTC USDT
# dashusdt DASH USDT
Get current buy/sell orderbook status on the market.
from oceanex_py3 import public
asks, bids, timestamp = public.get_orderbook('btcusdt', 10) # limit result to 10 orders.
Post an order to the market on behalf of user.
from oceanex_py3 import personal
test_config = {
'uid': 'IDxxxxx',
'apikey_id': 'Kxxxxxxx',
'private_key_location': '/xxx/xxx/xxx/key.pem'
}
p = personal.Personal(
test_config['uid'],
test_config['apikey_id'],
test_config['private_key_location']
)
order = p.new_sell_limit_order('vet', 'btc', 600000, 10000)
Cancel all the orders.
from oceanex_py3 import personal
test_config = {
'uid': 'IDxxxxx',
'apikey_id': 'Kxxxxxxx',
'private_key_location': '/xxx/xxx/xxx/key.pem'
}
p = personal.Personal(
test_config['uid'],
test_config['apikey_id'],
test_config['private_key_location']
)
p.cancel_all_orders()
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
oceanex_py3-1.1.4.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for oceanex_py3-1.1.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 324ee8b64211045ab4954d793e214187b3f2a9b977d3642747c00a7cb21826a0 |
|
MD5 | 27b05e5aca35c586db24ba69d5228dc3 |
|
BLAKE2b-256 | af1bf1452f33e3815048387c00caf96405a927a7b301d66455883f8da945f26d |