Skip to main content

Python SDK for the River Markets API

Project description

River Markets Python SDK

Python SDK for the River Markets API.

Installation

pip install rivermarkets

Authentication

The SDK authenticates with Ed25519 request signing. Create an API key in Settings → API Keys; you'll get a Key ID (UUID) and a base64-encoded private key (shown once at creation). Pass both to the client — every request is signed transparently via X-River-Key-Id, X-River-Timestamp, and X-River-Signature headers.

Usage

from rivermarkets import RiverMarkets

client = RiverMarkets(
    key_id="YOUR_KEY_ID",
    private_key="YOUR_BASE64_PRIVATE_KEY",
)

# Search markets
results = client.markets.search_markets(q="bitcoin")

# Place an order
order = client.orders.create_order(
    subaccount_id="...",
    river_id=4552150,
    order_type="LIMIT",
    time_in_force="GTC",
    buy_flag=True,
    price=0.50,
    qty=10,
)

# Cancel an order
client.orders.cancel_order(order_id="...")

Async

from rivermarkets import AsyncRiverMarkets

client = AsyncRiverMarkets(
    key_id="YOUR_KEY_ID",
    private_key="YOUR_BASE64_PRIVATE_KEY",
)
results = await client.markets.search_markets(q="bitcoin")

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

rivermarkets-0.2.0.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

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

rivermarkets-0.2.0-py3-none-any.whl (78.5 kB view details)

Uploaded Python 3

File details

Details for the file rivermarkets-0.2.0.tar.gz.

File metadata

  • Download URL: rivermarkets-0.2.0.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rivermarkets-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a8a15655dafe016726884d2d7c4f335b9f42fc5de4705bdb193f90f2133d3945
MD5 7cad088626016ad7ccbce5759982ead4
BLAKE2b-256 ddc9412024ac06dcba95d0d9fcfb5d7228964aeb303422335abfc55a06797660

See more details on using hashes here.

File details

Details for the file rivermarkets-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rivermarkets-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 78.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rivermarkets-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed2674aadb78cc479677511cfa659801f1121244664c794759fed1b5d9f853fc
MD5 9408938faba39f4a79eafd27d90eca9a
BLAKE2b-256 777452db419ce6684d73b4080bd4d89113a2c4abaa08c0a02420b0ac807a1d89

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