Changelog

Changelog

All notable changes to AxiomTradeAPI-py, newest first. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

v1.1.6

Browser-based login (Cloudflare Turnstile bypass)

Axiom Trade’s login endpoint requires a Cloudflare Turnstile token that can only be generated inside a real browser, which blocked direct API login. The SDK now uses nodriver to drive a real Chrome instance for login; Turnstile solves itself automatically inside the browser with no manual intervention.

from axiomtradeapi import AxiomTradeClient

client = AxiomTradeClient(
    username="you@example.com",
    password="yourpassword",
)
result = client.login()
# Chrome opens, fills credentials, solves Turnstile, prompts for OTP

nodriver is an optional dependency:

pip install "axiomtradeapi[browser]"

If it isn’t installed, the SDK falls back to the direct API path, which will fail on axiom.trade due to Turnstile.

Automatic OTP reading via IMAP

If IMAP credentials are provided, the SDK connects to the inbox, waits for the Axiom OTP email, extracts the 6-digit code, and enters it automatically for a zero-touch login:

result = client.login(
    imap_password="your_email_password",  # or an app password
    imap_user="real@example.com",          # only needed if the login is an alias
)

Supported providers are auto-detected from the email domain (Gmail, Outlook/Hotmail/Live, Yahoo, iCloud, ProtonMail, Hostinger, with a generic fallback). Gmail accounts with 2FA need an app password.

Persistent token storage

After a successful browser login, tokens are saved to encrypted local storage (~/.axiomtradeapi/). Every subsequent run loads and auto-refreshes them — no browser launch, no OTP required after the first login.

Other fixes

  • client.login() now syncs new tokens into the HTTP session after login
  • Removed a dead return login_result statement after the actual return
  • AxiomTradeClient gained cf_clearance, imap_password, imap_user, imap_host parameters
  • The login browser window is minimized automatically so the terminal stays accessible

v1.1.5

Chrome TLS impersonation (Cloudflare bypass)

Axiom Trade’s WebSocket endpoints sit behind Cloudflare Bot Management, and Python’s standard ssl/websockets stack has a different TLS fingerprint (JA3) from Chrome, causing Cloudflare to reject WebSocket connections with HTTP 502 regardless of cookies or headers. The WebSocket client now uses curl_cffi to impersonate Chrome’s exact TLS handshake, making the connection indistinguishable from a real browser at the TLS layer.

# Internally uses curl_cffi with impersonate="chrome136"
ws_client = AxiomTradeWebSocketClient(auth_manager=auth_manager)
await ws_client.subscribe_new_tokens(callback)
await ws_client.start()

curl_cffi is now a required dependency, installed automatically via pip.

Automatic token refresh (JWT-aware)

Previously, AuthManager._set_tokens() hardcoded expires_at = now + 3600, ignoring the real JWT exp claim. Since access tokens have a roughly 16-minute lifetime, they appeared valid for up to an hour after loading and refresh was never triggered. _set_tokens() now parses the JWT payload for the real exp/iat timestamps, so expired tokens are detected and refreshed immediately before any API call or WebSocket connection. The refresh request itself also now uses curl_cffi so Cloudflare accepts it.

Pre-flight HTTP warm-up

The WebSocket client now mirrors browser behavior with two HTTP requests before opening the WebSocket (GET /wo/server-time and GET /get-announcement), ensuring Cloudflare’s __cf_bm cookie is correctly associated with the subsequent WebSocket upgrade.

Other fixes

AreaFix
WebSocket URLRemoved a trailing double slash that caused 502 on all clusters
User-AgentUpdated to match the current cf_clearance fingerprint
Cluster fallbackFixed broken fallback logic; now tries alternate clusters on primary failure
LoggingFixed duplicate log lines from logger propagation to the root handler
subscribe_* methodsUnified send path across the new curl_cffi transport

New dependency: curl_cffi>=0.7.0 (installed automatically).

For long-running bots, set CF_CLEARANCE in your .env — it lasts about 30 minutes in a browser session and must be refreshed manually when it expires (access tokens refresh automatically).

v1.1.4

  • Automatic browser-session bootstrap before trending calls, mirroring the same session flow normally triggered by client.connect
  • Suggested recovery steps included in the returned trending error payload
  • Better fallback behavior when the trending service is unstable across multiple hosts and periods, with safer non-throwing behavior by default for production bots

v1.1.3

  • Multi-host failover for trending requests across current Axiom API domains
  • Cached trending response fallback for temporary upstream outages
  • Structured trending error payloads with status code, failing URL, and attempted endpoints
  • New documentation pages for trending v2 usage and troubleshooting
  • Improved diagnostics for intermittent 500 and 404 issues
result = client.get_trending_tokens("1h")

if result.get("success"):
    print(result.get("count"))
else:
    print(result.get("error"))

v1.1.2

Migrated trending requests to the new trending v2 endpoint:

  • normalized the raw array response into a dictionary-friendly structure
  • added automatic retries for transient server failures
  • added a safe fallback between time periods when upstream endpoints return 500 errors
  • preserved compatibility with existing code expecting tokens in a dictionary payload

See Trending Tokens for usage and troubleshooting.

v1.0.3

  • Automatic token refresh: secure token storage with Fernet encryption and automatic refresh
  • 8 new analytics functions: get_token_info_by_pair(), get_last_transaction(), get_pair_info(), get_pair_stats(), get_meme_open_positions(), get_holder_data(), get_dev_tokens(), get_token_analysis() — see the Guides section for dedicated pages on the most commonly used ones
  • Direct RPC transaction sending to Solana RPC endpoints
  • Updated base URLs to the correct api10.axiom.trade endpoints
  • Comprehensive error handling and debugging support

Breaking changes from v0.2.0

  • Trading endpoints now require manual transaction building
  • Some API endpoints changed from api6.axiom.trade to api10.axiom.trade
from axiomtradeapi.client import AxiomTradeClient

client = AxiomTradeClient(
    auth_token="your_token",
    refresh_token="your_refresh_token"
)

token_info = client.get_token_info_by_pair("PAIR_ADDRESS")
positions = client.get_meme_open_positions("WALLET_ADDRESS")

v0.2.0

  • Basic AxiomTrade API integration
  • WebSocket support
  • Telegram bot integration
  • Token-based authentication
  • Basic trading functionality: trending tokens, portfolio management, basic balance checking, WebSocket real-time data