Skip to content

itolosa/orionx-api-client

Repository files navigation

Orionx Api Client

PyPI version fury.io PyPi license PyPI pyversions Downloads codecov

Orionx Api Client is a GraphQL Client for Orionx Exchange (orionx.com)

It is able to make transactions and show market information

Install

Using pip:

pip install orionx-api-client

Using poetry:

poetry add orionx-api-client

Usage example

To execute the examples you have to setup an API KEY and a SECRET KEY

You can obtain them by following this tutorial: link.

from orionx_api_client import Orionx

client = Orionx("<api-key>", "<secret-key>")

with client as session:
    ds = session.dsl()

    query = ds.Query.marketStats.args(
        marketCode="BTCCLP",
        aggregation="h1"
    ).select(
        ds.MarketStatsPoint.open
    )

    print(session.execute(query))

For additional details check the examples directory in this repository

Query batching

You can send multiple requests at once using query batching.

Check the file examples/using_batcher.py for an example.

Contributions

You're welcome to contribute to this project! Just open a PR!