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.3.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.3-py2.py3-none-any.whl (6.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: oceanex_py3-1.1.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for oceanex_py3-1.1.3.tar.gz
Algorithm Hash digest
SHA256 229b8a36326a4a7b75d5695323b75ad13fc56ac297d26531d0a3fe779ffa5c64
MD5 b35a3ad67408e320a66332592457d216
BLAKE2b-256 abd5e3bc42d23cde3886d0762912d6e147364549d6e77e2a3d7c36d13db607e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oceanex_py3-1.1.3-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.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for oceanex_py3-1.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7e5030332894e35bbe77c6818897088eba4e40b56a444f350582aece5ccb1da9
MD5 4d15a8ca46bebcaca123f96cbc826cdb
BLAKE2b-256 654406ef041e7b41130dea0ced52d9430f336a64277af9c4d706dbdf20eebeec

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