# 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
- Python 3.8+
- Poetry
Setup
- Clone the repository:
git clone https://github.com/8ball030/hundred_x.git &&cd hundred_x
- 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 |
kjr217 |
thegeronimo |
Mihai |
Project details
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file hundred_x-0.1.29.tar.gz
.
File metadata
- Download URL: hundred_x-0.1.29.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ffe7e7cda080ef20d03af25b6ddbd215d8b5835c8fa84d86fcd29146bb41ac8 |
|
MD5 | e875ff5c65fd2dc198b2e008639926ec |
|
BLAKE2b-256 | 99111ac63ebc978047dcfc3098f30d52cc1ed88fd7c0099f132a38e2656cac15 |
File details
Details for the file hundred_x-0.1.29-py3-none-any.whl
.
File metadata
- Download URL: hundred_x-0.1.29-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4e7a8a10b4423d806612529d9648fec37d54a94fc5ad6f24b6c33a9e05d319 |
|
MD5 | c840e68484ad837bc8bb79cab5867635 |
|
BLAKE2b-256 | 6987f03d07e31c19d2bef4185d195e85cd41c6fd283009ce9be736a7578c01a2 |