Python SDK for the AttaGo crypto trading dashboard API
Project description
attago — Python SDK
Python SDK for the AttaGo crypto trading dashboard API.
Install
pip install attago
Quick Start
API Key Authentication
import asyncio
from attago import AttaGoClient
async def main():
async with AttaGoClient(api_key="ak_live_abc123") as client:
score = await client.agent.get_score("BTC")
print(f"{score.token}: {score.composite.signal} ({score.composite.score:.1f})")
asyncio.run(main())
Sync Mode
from attago import AttaGoClient
client = AttaGoClient(api_key="ak_live_abc123", sync=True)
score = client.agent.get_score_sync("BTC")
print(score.composite.signal)
client.close()
x402 Signer Authentication
from attago import AttaGoClient
client = AttaGoClient(signer=my_wallet_signer)
score = await client.agent.get_score("BTC")
Cognito Authentication
from attago import AttaGoClient
client = AttaGoClient(
email="user@example.com",
password="...",
cognito_client_id="abc123",
)
await client.auth.sign_in()
profile = await client.data.get_latest()
API Reference
| Service | Methods |
|---|---|
client.agent |
get_score(symbol), get_data(*symbols) |
client.data |
get_latest(), get_token_data(token), get_data_push(request_id) |
client.subscriptions |
catalog(), list(), create(input), update(sub_id, input), delete(sub_id) |
client.payments |
subscribe(input), status(), upgrade_quote(tier, cycle) |
client.wallets |
register(input), list(), remove(address) |
client.webhooks |
create(url), list(), delete(id), send_test(opts), send_server_test(id) |
client.mcp |
initialize(), list_tools(), call_tool(name, args), ping() |
client.api_keys |
create(name), list(), revoke(key_id) |
client.bundles |
list(), purchase(input) |
client.push |
list(), create(input), delete(sub_id) |
client.redeem |
redeem(code) |
Webhook Listener
from attago import WebhookListener
listener = WebhookListener(secret="whsec_...", port=4000)
listener.on_alert(lambda p: print(f"{p.alert.token}: {p.alert.state}"))
listener.on_test(lambda p: print("Test received"))
listener.start()
Signature Verification
from attago import verify_signature
body = request.body # raw bytes
signature = request.headers["X-AttaGo-Signature"]
if verify_signature(body, webhook_secret, signature):
# valid
Error Handling
from attago import AttaGoClient, ApiError, PaymentRequiredError, RateLimitError
try:
score = await client.agent.get_score("BTC")
except PaymentRequiredError as e:
print(f"Payment needed: {e.payment_requirements}")
except RateLimitError as e:
print(f"Rate limited, retry after {e.retry_after}s")
except ApiError as e:
print(f"API error {e.status_code}: {e.message}")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file attago-0.1.0.tar.gz.
File metadata
- Download URL: attago-0.1.0.tar.gz
- Upload date:
- Size: 40.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
291f87a9176440f61f7c7c2fbbac552a820677bc2da7a9d4d2b2d5ae0fe4f677
|
|
| MD5 |
0549df7517c355420bf7e115baaccb19
|
|
| BLAKE2b-256 |
a9e2e0f0e815f9c4d49bedba451a83ef736a834697863007a72c65bbc6f8afe0
|
Provenance
The following attestation bundles were made for attago-0.1.0.tar.gz:
Publisher:
publish.yml on AttaGo/attago-py-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
attago-0.1.0.tar.gz -
Subject digest:
291f87a9176440f61f7c7c2fbbac552a820677bc2da7a9d4d2b2d5ae0fe4f677 - Sigstore transparency entry: 1072820821
- Sigstore integration time:
-
Permalink:
AttaGo/attago-py-sdk@b594b14a51af9df99a6e9011b7ca29742b36de9c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/AttaGo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b594b14a51af9df99a6e9011b7ca29742b36de9c -
Trigger Event:
push
-
Statement type:
File details
Details for the file attago-0.1.0-py3-none-any.whl.
File metadata
- Download URL: attago-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e3f38ca0d4f3ec311d4745fd58fa144009c033cd0f933eeaa71ef0b47b18c37
|
|
| MD5 |
83e5e6daa926524dcf669fd9774f77dc
|
|
| BLAKE2b-256 |
a27ef4f3e58e431c191f12c303edf1e38eee5dad017de4db8808910e11baba1a
|
Provenance
The following attestation bundles were made for attago-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on AttaGo/attago-py-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
attago-0.1.0-py3-none-any.whl -
Subject digest:
8e3f38ca0d4f3ec311d4745fd58fa144009c033cd0f933eeaa71ef0b47b18c37 - Sigstore transparency entry: 1072820892
- Sigstore integration time:
-
Permalink:
AttaGo/attago-py-sdk@b594b14a51af9df99a6e9011b7ca29742b36de9c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/AttaGo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b594b14a51af9df99a6e9011b7ca29742b36de9c -
Trigger Event:
push
-
Statement type: