Skip to main content

# hundred_x

Project description

100x

A Python client for the 100x API, providing a convenient wrapper to interact with the API.

Installation

pip install hundred-x

Usage

from hundred_x.client import HundredXClient
from hundred_x.enums import Environment

client = HundredXClient(
    private_key="your_private_key",
    environment=Environment.PROD
)

# List available products
products = client.list_products()
print(products) 

# Get the current price of a symbol
price = client.get_product("ethperp")
print(price)

# Place an order
order = client.place_order(
    symbol="ethperp",
    side="BUY",
    order_type="LIMIT",
    post_only=False,
    size="0.1",
    price="1800",
    limit_fee_rate="0.001"
)
print(order)

For asynchronous usage, refer to 'examples/async_client.py'.

Development

Prequisites

Setup

  1. Clone the repository:
git clone https://github.com/8ball030/hundred_x.git &&cd hundred_x
  1. Create a development environment:
poetry install && poetry shell

Development Commands

# Format Code
make fmt

# Lint Code
make lint

# Run Tests
make tests

# Run all checks
make all

# Create a new release
make release

Docker Environemnt

# Build Docker Image
docker buildx build --platform linux/amd64 . -t test

# Run tests in Docker
docker run -v (pwd):/app -it test

Contributing

Contributors

8ball030/
8ball030
kjr217/
kjr217
thegeronimo/
thegeronimo
Mihai/
Mihai

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

hundred_x-0.1.29.tar.gz (11.0 kB view hashes)

Uploaded Source

Built Distribution

hundred_x-0.1.29-py3-none-any.whl (12.1 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