Skip to main content

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

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.2.2.tar.gz (7.0 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.2.2-py2.py3-none-any.whl (7.4 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: oceanex_py3-1.2.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for oceanex_py3-1.2.2.tar.gz
Algorithm Hash digest
SHA256 e2fb81caaa16c2612c9126e2a3d23ca2734e2b26aca1c95226f187d2b59f9d8f
MD5 b63e93b79de091210ca1c5a37df0d7f5
BLAKE2b-256 69ab8ae3affadfed640d78a2aad80f2318dc21b46fa5138bf1e04ccc43882a7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oceanex_py3-1.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.6

File hashes

Hashes for oceanex_py3-1.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3e8e7d2532e3fc86120d5eef2f6da580d545f78993ff5526b5b3653ed08246da
MD5 86fdd27403a448c16f8f16f0e1dc66da
BLAKE2b-256 a137ddf7332c286b3ccdcd3c20ce3154b1a3edc63b87142d4a998668739fe2eb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 files

1.2.1

2 files

1.2.0

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

Supported by

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