Skip to main content

Python bindings for the Absurdia API

Project description

Official Absurdia Bindings for Python

PyPI

A Python library for Absurdia's API.

Supported services:

  • Realtime prices (GET /prices)
  • Realtime trades (GET /trades)
  • Realtime orderbooks (GET /orderbooks)

Additional endpoints:

  • Get your account (GET /accounts)
  • Get your agents (GET /agents)
  • Get your funds (GET /funds)

Setup

You can install this package by using the pip tool and installing:

$ pip install absurdia

Setting up an Absurdia account

Sign up for Absurdia at https://app.absurdia.com/signup.

Using the the package

Create a new agent in (your dashboard)[https://app.absurdia.com/dash/agents] and download the credential file. Put the credential file in the same directory as your Python script.

Once done, you can use the package like this:

from absurdia import markets
import absurdia

# Get all the supported symbols
symbols = markets.symbols()

# Get the price of a symbol
price = markets.price("BTC.USDT-SPOT-BIN")

# Get the latest 100 trades of a symbol
trades = markets.trades("BTC.USDT-SPOT-BIN")

# Get the latest limit order book snapshot of a symbol
orderbook = markets.orderbook("BTC.USDT-SPOT-BIN")

# Get your account
account = absurdia.Account.current()

Change the path of the credentials file

You can change the path of the file with:

import absurdia

absurdia.agent_filepath = "/path/to/file/absurdia-agent.env"

Use your credentials directly

Add the credentials the way you prefer by changing the global variables:

import absurdia

absurdia.agent_id = "<ID>"
absurdia.agent_token = "<Agent Token>"
absurdia.agent_signature_key = "<Signature Key>"

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

absurdia-0.0.3.tar.gz (22.0 kB view hashes)

Uploaded Source

Built Distribution

absurdia-0.0.3-py3-none-any.whl (26.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page