Skip to main content

1151 Exchange API

Project description

1151-py SDK

Minimal Python SDK exposing a client with an exchange method.

Quickstart

  1. Create and activate a virtualenv (recommended):

    python3 -m venv .venv
    source .venv/bin/activate  # Windows: .venv\Scripts\activate
    
  2. Install in editable mode with dev tools you need:

    pip install -e .
    # Optional: pytest for running tests
    pip install pytest
    
  3. Run tests:

    pytest
    
  4. Use the SDK:

    from m1151 import Client
    
    client = Client(api_key="YOUR_API_KEY")
    res = client.exchange(
        amount=1.23,
        in_return="BTC",
        you_give="ETH",
        receive_wallet="YOUR_WALLET_ADDRESS",
    )
    print(res)
    

Project layout

pyproject.toml
pytest.ini
src/
  m1151/
    __init__.py
    client.py
  sample_pkg/  # legacy sample remains for tests
    __init__.py
    core.py
    cli.py
tests/
  test_core.py

Notes

  • SDK client is available as m1151.Client.
  • Base URL defaults to a hardcoded https://api.1151.app. Override by passing base_url to Client(...) if needed.
  • The exchange call sends a POST to {base_url}/exchange with the API key in the JSON body.

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

py_1151-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

py_1151-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file py_1151-0.1.0.tar.gz.

File metadata

  • Download URL: py_1151-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for py_1151-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46ce50a873a986aaa186759fb8dcda168da8ae3174eee5416141d377389b3192
MD5 7179acde83451d1f5819a1e186c5865a
BLAKE2b-256 dcd9b50f463a18b926c82c4930cf4e6c52b64ede2ec9b6f922b63dc809d73cf1

See more details on using hashes here.

File details

Details for the file py_1151-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: py_1151-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for py_1151-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 edd8d37d54bc567a1ec47fcecfadf45bf19b5f8ab0504183b14ba45c93af4fce
MD5 41618103013b823adf018f66b26ae349
BLAKE2b-256 e1727a251f78aaef2d4085a4198accfdecbcd58ea283674e74acb235d78b7ca8

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