-
Notifications
You must be signed in to change notification settings - Fork 8
Fix balance check and trading transaction 404 errors #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: theshadow76 <[email protected]>
Co-authored-by: theshadow76 <[email protected]>
Co-authored-by: theshadow76 <[email protected]>
Co-authored-by: theshadow76 <[email protected]>
|
Great, looks like now everything is working for the GetBalance: 2025-10-12 14:48:25,990 - AxiomTradeAPI - INFO - Successfully retrieved balance for BJBgjyDZx5FSsyJf6bFKVXuJV7DZY9PCSMSi5d9tcEVh: 0 SOL
Balance: {'sol': 0, 'lamports': 0, 'slot': 372881669} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes 404 errors in balance check and trading transaction functionality by correcting the base URL for API endpoints from https://api6.axiom.trade to https://axiom.trade/api.
- Updated the
BASE_URL_APIconstant to use the correct endpoint URL - Added comprehensive documentation outlining the fix and its impact
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| axiomtradeapi/content/endpoints.py | Updated BASE_URL_API constant to fix 404 errors for balance and trading endpoints |
| ENDPOINT_FIX_SUMMARY.md | Added detailed documentation explaining the issue, fix, and affected endpoints |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Problem
Users were experiencing 404 errors when attempting to use balance check and trading functionality:
As noted in the issue, methods like
refresh_access_token_directandsubscribe_new_tokenswere working correctly, indicating that authentication was functioning properly.Root Cause
The SDK was using
https://api6.axiom.tradeas the base URL for balance and trading endpoints. However, the actual Axiom Trade web application useshttps://axiom.trade/apifor these specific endpoints, as confirmed by inspecting the Network tab in the browser.Solution
Changed the
BASE_URL_APIconstant inaxiomtradeapi/content/endpoints.py:This single-line change correctly updates all affected endpoints since they construct URLs using this base:
Impact
This fix resolves 404 errors for the following endpoints:
/batched-sol-balance→https://axiom.trade/api/batched-sol-balance/buy→https://axiom.trade/api/buy/sell→https://axiom.trade/api/sell/sol-balance→https://axiom.trade/api/sol-balance/token-balance→https://axiom.trade/api/token-balance/send-transaction→https://axiom.trade/api/send-transactionAll affected methods (
GetBalance(),GetBatchedBalance(),buy_token(),sell_token(),get_sol_balance(),get_token_balance()) now use the correct base URL.Backward Compatibility
Other endpoints continue to use their respective working base URLs:
https://api9.axiom.tradehttps://api6.axiom.tradehttps://api6.axiom.tradeandhttps://api10.axiom.tradeThese were already functioning correctly and remain unchanged.
Testing
Closes #[issue_number]
Original prompt
Fixes #8
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.