Skip to content

Releases: ChipaDevTeam/AxiomTradeAPI-py

axiomtradeap—v1.1.5

07 Jun 18:21

Choose a tag to compare

What's Changed

  • Update python-dotenv requirement from >=1.0.0 to >=1.2.1 by @dependabot[bot] in #26

New Contributors

Full Changelog: axiomtradeapi-1.1.0...axiomtradeap—v1.1.5

Release Notes — v1.1.5

Trade on Axiom: axiom.trade/@chipadev
Build bots faster with ChipaEditor — the AI-powered IDE for DeFi developers.


What's New

🛡️ Chrome TLS Impersonation (Cloudflare bypass)

Problem: Axiom Trade's WebSocket endpoints sit behind Cloudflare's Bot Management. Python's standard ssl/websockets stack has a different TLS ClientHello fingerprint (JA3) from Chrome. Cloudflare was rejecting all WebSocket connection attempts with HTTP 502 regardless of cookies or headers.

Fix: The WebSocket client now uses curl_cffi — a Python binding to libcurl compiled with BoringSSL — to impersonate Chrome 136's exact TLS handshake. This makes 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 and is installed automatically via pip.


🔄 Automatic Token Refresh (JWT-aware)

Problem: AuthManager._set_tokens() previously hardcoded expires_at = now + 3600, ignoring the real JWT exp claim. Access tokens have a ~16-minute lifetime, so they appeared valid until an hour after loading — and refresh was never triggered.

Fix: _set_tokens() now parses the JWT payload to extract the actual exp and iat timestamps. Expired tokens are detected immediately and refreshed automatically before any API call or WebSocket connection.

The token refresh request itself also now uses curl_cffi (Chrome TLS) so Cloudflare accepts it.


🌐 Pre-flight HTTP Warm-up

The WebSocket client now mirrors the browser's behaviour by making two HTTP requests immediately before opening the WebSocket:

  1. GET https://api.axiom.trade/wo/server-time — establishes the Cloudflare session
  2. GET https://api6.axiom.trade/get-announcement — secondary warm-up

Both use the same Chrome TLS session, ensuring Cloudflare's __cf_bm cookie is correctly associated with the subsequent WebSocket upgrade.


🔧 Other Fixes

Area Fix
WebSocket URL Removed trailing double-slash (///) that caused 502 on all clusters
User-Agent Updated to Chrome 148 Windows to match cf_clearance fingerprint
Cluster fallback Fixed broken fallback logic (old condition "cluster-usc2" in url was never true) — now tries cluster3/5/7 on primary failure
Logging Fixed duplicate log lines caused by logger propagation to root handler
subscribe_* methods Unified send path; all subscriptions work correctly with the new curl_cffi transport

New Dependency

curl_cffi>=0.7.0

Installed automatically. If you manage dependencies manually:

pip install "curl_cffi>=0.7.0"

CF_CLEARANCE Environment Variable

For long-running bots, set CF_CLEARANCE in your .env file for the most reliable connections:

CF_CLEARANCE=<value from browser DevTools → Application → Cookies → axiom.trade → cf_clearance>
AXIOM_ACCESS_TOKEN=<your access token>
AXIOM_REFRESH_TOKEN=<your refresh token>

cf_clearance lasts ~30 minutes in a browser session. The SDK will automatically refresh your access token using curl_cffi, but cf_clearance must be refreshed manually when it expires. A future release will automate this via headless browser integration.


Upgrade

pip install --upgrade axiomtradeapi

Links

axiomtradeapi-1.1.0

10 Feb 17:02
f54b937

Choose a tag to compare

What's Changed

Full Changelog: axiomtradeapi-1.0.9...axiomtradeapi-1.1.0

axiomtradeapi-1.0.9

10 Feb 16:00
70ea05b

Choose a tag to compare

What's Changed

Full Changelog: axiomtradeapi-1.0.8...axiomtradeapi-1.0.9

axiomtradeapi-1.0.8

10 Feb 15:27
1699a87

Choose a tag to compare

What's Changed

  • feat: Adds wallet transaction subscription via WebSocket by @hard-king in #3
  • fix: Fix the buy/sell token methods that use PumpPortal API by @lzh0430 in #6
  • Fix balance check and trading transaction 404 errors by @Copilot in #9
  • Fix balance check & transaction errors by migrating to blockchain-direct operations by @Copilot in #10
  • Consolidate duplicate client implementations into single client.py by @Copilot in #12
  • Fix login authentication: change password hash encoding from ISO-8859-1 to UTF-8 by @Copilot in #14
  • Fix WebSocket message routing for subscribe_wallet_transactions and subscribe_token_price by @Copilot in #15
  • fix new password hash algo by @chises in #16
  • [WIP] Add example script for websocket connection to AxiomTradeAPI by @Copilot in #17
  • Fix: Switch to batched-sol-balance endpoint, /sol-balance deprecated by @BigWess57 in #18
  • Fix WebSocket compatibility and new tokens parsing, add get_websocket_client helper by @BigWess57 in #19
  • Add websockets 10.x/13+ compatibility for connection headers by @Copilot in #20
  • Fix login otp and add tools by @theshadow76 in #21
  • Add proxy support by @theshadow76 in #22

New Contributors

Full Changelog: https://github.com/ChipaDevTeam/AxiomTradeAPI-py/commits/axiomtradeapi-1.0.8