feat(v3.1.11): rewrite RestClientV3 apidoc examples and add missing UTA endpoints - #154
Merged
Merged
Conversation
… account management features - Introduced new methods in RestClientV3 for retrieving reality fills and order book data. - Added request and response types for agent subaccount creation, position movement, and related functionalities. - Updated existing types to improve consistency and support new features.
…g operations - Introduced new example scripts for adjusting account modes, batch modifying orders, placing batch orders, and managing subaccounts. - Added examples for canceling orders, confirming payments, and retrieving account information and assets. - Enhanced documentation with practical usage examples for various trading and account management functionalities.
- Introduced multiple new example scripts for various account management operations, including adjusting account modes, retrieving account information, and managing subaccounts. - Added examples for crypto loan functionalities such as borrowing coins, getting loan history, and repaying loans. - Enhanced documentation with practical usage examples for the new features.
- Deleted the generate-account-apidoc.mjs script, which contained example API calls for account management. - This cleanup helps streamline the codebase by removing unused or redundant files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR body / release notes
Summary
RestClientV3 apidoc examples are rewritten to match official Bitget UTA docs (Bybit-style): kebab-case filenames from API doc titles, inline params from curl examples, no auto-gen headers. Adds missing SDK methods and fixes several request/response types that were out of sync with the docs.
RestClientV3 apidoc (177 examples)
Replaced all camelCase auto-generated stubs under examples/apidoc/RestClientV3/ with manual examples covering:
Market / Public (35)
Account (52)
Trade (22)
Strategy (5)
Copy Trading (5)
Earn (8)
Tax (1)
Crypto Loans (11)
Inst Loan (9)
P2P (18)
Broker (11)
Each file follows the same pattern: RestClientV3 client init, SDK method call with doc params, .then / .catch logging.
New SDK methods
Method Endpoint
getRealityOrderBook
GET /api/v3/account/reality-orderbook
getRealityFills
GET /api/v3/account/reality-fills
createAgentSubAccount
POST /api/v3/user/sub-account/agent-create
subMasterTransfer
POST /api/v3/account/sub-master-transfer
movePositions
POST /api/v3/account/move-positions
getMovePositionHistory
GET /api/v3/account/move-position-history