Skip to main content

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

https://github.com/laalaguer/oceanex_py3

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


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

Uploaded Source

Built Distribution

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

oceanex_py3-1.1.4-py2.py3-none-any.whl (6.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file oceanex_py3-1.1.4.tar.gz.

File metadata

  • Download URL: oceanex_py3-1.1.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for oceanex_py3-1.1.4.tar.gz
Algorithm Hash digest
SHA256 c24bf2abefd580aaa2e284c39d70041d904ff895c7bcb2211a06426473c7f883
MD5 9f918e7150adc62a31327694ca7d91e1
BLAKE2b-256 b1ba7b52ae6b62dcafea0e7a892f220b69675fc8298f7d281074e55a9830b848

See more details on using hashes here.

File details

Details for the file oceanex_py3-1.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: oceanex_py3-1.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for oceanex_py3-1.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 324ee8b64211045ab4954d793e214187b3f2a9b977d3642747c00a7cb21826a0
MD5 27b05e5aca35c586db24ba69d5228dc3
BLAKE2b-256 af1bf1452f33e3815048387c00caf96405a927a7b301d66455883f8da945f26d

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