Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
b0188b7
Merge pull request #3 from asterdex/hidden
ivanzyzy Jun 20, 2025
57b8e09
Update aster-finance-api.md
danielaster Jul 21, 2025
22c53fa
Update aster-finance-api_CN.md
danielaster Jul 21, 2025
fb9ea09
add funding rate config
mark-c-c Aug 26, 2025
a040480
Merge pull request #6 from asterdex/AP-3909
markc-jupiter Aug 26, 2025
85c07fd
spot doc
ivanzyzy Sep 1, 2025
dcc4b85
Merge pull request #7 from asterdex/spt
ivanzyzy Sep 1, 2025
0ea1be2
spot fix
ivanzyzy Sep 2, 2025
badd994
Merge pull request #8 from asterdex/spot-fix
ivanzyzy Sep 2, 2025
da41503
spot en
ivanzyzy Sep 2, 2025
2eef82d
Merge pull request #9 from asterdex/spot-en
ivanzyzy Sep 2, 2025
0d62d18
fee
ivanzyzy Sep 2, 2025
7e7f0a3
Merge pull request #11 from asterdex/fee
ivanzyzy Sep 2, 2025
70b88fe
asset fix
ivanzyzy Sep 2, 2025
ae92a62
Merge pull request #12 from asterdex/asset-fix
ivanzyzy Sep 2, 2025
b4f7dad
fix url
ivanzyzy Sep 2, 2025
f8f66c7
Merge pull request #13 from asterdex/fix-url
ivanzyzy Sep 2, 2025
c1fba3e
spot en
ivanzyzy Sep 4, 2025
d60063a
Merge pull request #14 from asterdex/spoten
ivanzyzy Sep 4, 2025
428f12f
futures v3
ivanzyzy Sep 16, 2025
ec6e9f9
Merge pull request #15 from asterdex/v3
ivanzyzy Sep 16, 2025
19a5c16
v3 change url to prod
ivanzyzy Sep 16, 2025
4d587fa
Merge pull request #16 from asterdex/v3
ivanzyzy Sep 16, 2025
a1dada4
use apiwallet
ivanzyzy Sep 19, 2025
812d6f2
Merge pull request #17 from asterdex/apiwallet
ivanzyzy Sep 19, 2025
81f130d
add api guide
ivanzyzy Sep 24, 2025
6179cc4
Merge pull request #22 from asterdex/apiguidance
ivanzyzy Sep 24, 2025
ee484d3
apiv3 url
ivanzyzy Sep 29, 2025
574d96e
Merge pull request #28 from asterdex/apiv3fix
ivanzyzy Sep 29, 2025
6155789
apiv3 add create url
ivanzyzy Sep 29, 2025
29994ed
Merge pull request #29 from asterdex/apiv3fix
ivanzyzy Sep 29, 2025
5a28f85
add spotcancelall
ivanzyzy Sep 30, 2025
2ca7b9a
Merge pull request #30 from asterdex/spotcancelall
ivanzyzy Sep 30, 2025
cc5ca87
v3 go demo
ivanzyzy Oct 1, 2025
f2bedf0
Merge pull request #31 from asterdex/go-demo
ivanzyzy Oct 1, 2025
2363ab9
get all orders for spot
ivanzyzy Oct 3, 2025
c65b244
Merge pull request #32 from asterdex/getall
ivanzyzy Oct 3, 2025
f5c4fd4
add api-key docs
Oct 17, 2025
69683c5
Merge pull request #33 from asterdex/AP-5948
Aster-docs Oct 17, 2025
fb87ca1
AP-5852 Adding dual side and fee burn update to ACCOUNT_CONFIG_UPDATE…
mark-c-c Oct 18, 2025
53d6e3a
Merge pull request #35 from asterdex/AP-5852
markc-jupiter Oct 18, 2025
269cc5d
add new documents:
Oct 18, 2025
38f4300
Merge pull request #37 from asterdex/AP-5948
Aster-docs Oct 21, 2025
a5a39ba
fix docs
Oct 23, 2025
9c58ea4
Merge pull request #39 from asterdex/fix
Aster-docs Oct 23, 2025
21417bc
fix path
Oct 27, 2025
28deb79
Merge pull request #40 from asterdex/path_fix
Aster-docs Oct 27, 2025
05c1637
remove useless
Oct 27, 2025
fd6b71a
Merge pull request #41 from asterdex/remove-useless
Aster-docs Oct 27, 2025
b95cd87
add api-key docs
Oct 28, 2025
57bdcdd
Merge pull request #42 from asterdex/api-key-docs
Aster-docs Oct 28, 2025
d5b1a2a
add login docks
Oct 29, 2025
59ed8a5
Merge pull request #43 from asterdex/add-api-key
Aster-docs Oct 29, 2025
552b055
add api create apikey demo
ivanzyzy Oct 30, 2025
febed70
Merge pull request #44 from asterdex/create-api-demo
ivanzyzy Oct 30, 2025
e0633c1
api key create front and ae logi
ivanzyzy Oct 30, 2025
31c0c67
Merge pull request #45 from asterdex/api_front
ivanzyzy Oct 30, 2025
d86c345
login first
ivanzyzy Oct 31, 2025
5a208b6
v1->v3
ivanzyzy Oct 31, 2025
8899813
Merge pull request #47 from asterdex/api_front
ivanzyzy Oct 31, 2025
5bd7cc6
add solana withdraw api
Nov 7, 2025
442321a
Merge pull request #48 from asterdex/add-solana-api
Aster-docs Nov 7, 2025
efbb5aa
add header
Nov 18, 2025
0bd1430
Merge pull request #54 from asterdex/login-fix
Aster-docs Nov 18, 2025
e30ff74
change response detail
Nov 20, 2025
70a2664
Merge pull request #55 from asterdex/change-response-detail
Aster-docs Nov 20, 2025
8a01204
fix some desc
Nov 26, 2025
a057b15
add new api
Dec 2, 2025
7787c2e
Merge pull request #57 from asterdex/add-spot-solana-withdraw-api
Aster-docs Dec 2, 2025
0ce72ec
remove sendto
ivanzyzy Dec 25, 2025
752bf4e
Merge pull request #60 from asterdex/sendtoaddress
ivanzyzy Dec 25, 2025
d491c53
change api params
Dec 25, 2025
896ed79
testnet doc
ivanzyzy Jan 8, 2026
d3f3600
Merge pull request #61 from asterdex/testnet
ivanzyzy Jan 12, 2026
f47086e
Remaining Openable Notional Value
mark-c-c Jan 21, 2026
3da8b09
Merge pull request #62 from asterdex/remainingOpenableNotionalValue
ivanzyzy Jan 21, 2026
d7c9b1f
eip172
ivanzyzy Jan 22, 2026
7682d43
noop operation
ivanzyzy Jan 22, 2026
4045294
Merge pull request #63 from asterdex/noop
ivanzyzy Jan 22, 2026
40a38d0
funding config
ivanzyzy Jan 27, 2026
5dbbd79
change host
ivanzyzy Jan 27, 2026
9a1a99b
add aster code demo
ivanzyzy Jan 27, 2026
22c2fff
transfer
ivanzyzy Jan 27, 2026
a9b9b29
Merge pull request #64 from asterdex/eip712
ivanzyzy Jan 27, 2026
9ee97c4
v3batchdemo
ivanzyzy Mar 9, 2026
8677779
Merge pull request #67 from asterdex/v3batchdemo
ivanzyzy Mar 9, 2026
d5a0c89
removesymbol
ivanzyzy Mar 10, 2026
0c367fc
Merge pull request #68 from asterdex/removesymbol
ivanzyzy Mar 10, 2026
6191fe5
gitbook
ivanzyzy Mar 11, 2026
fa4bdd3
Merge pull request #69 from asterdex/gitbook
ivanzyzy Mar 11, 2026
253aeae
spotv3
ivanzyzy Mar 12, 2026
a295634
Merge pull request #70 from asterdex/spotv3
ivanzyzy Mar 12, 2026
3e3ad24
spotnoop
ivanzyzy Mar 12, 2026
d3d9999
Merge pull request #71 from asterdex/spotnoop
ivanzyzy Mar 12, 2026
19ef27a
noopdemo
ivanzyzy Mar 12, 2026
ddaba68
Merge pull request #72 from asterdex/noopdemo
ivanzyzy Mar 12, 2026
60dd767
MARKET_DATA no need auth
ivanzyzy Mar 13, 2026
e8537ed
Merge pull request #73 from asterdex/MARKET_DATA_not_auth
ivanzyzy Mar 13, 2026
bc99b7a
remove go demo
ivanzyzy Mar 17, 2026
3609549
Merge pull request #75 from asterdex/removegodemo
ivanzyzy Mar 17, 2026
bdcc080
add hidden in v3
ivanzyzy Mar 17, 2026
2bea734
remove timestamp
ivanzyzy Mar 17, 2026
1db0609
Merge pull request #76 from asterdex/onchain
ivanzyzy Mar 17, 2026
e69f664
remove tx demo
ivanzyzy Mar 17, 2026
2f94a40
Merge pull request #77 from asterdex/removetxdemo
ivanzyzy Mar 17, 2026
097d3bc
asterchain doc
vanessa-aster Mar 17, 2026
4f0a044
Merge pull request #78 from asterdex/asterchain-doc
vanessa-aster Mar 17, 2026
6a5e185
trade pro and nonce expalin
ivanzyzy Mar 17, 2026
22916ed
nonce
ivanzyzy Mar 17, 2026
031db95
Merge pull request #79 from asterdex/tradepro
ivanzyzy Mar 17, 2026
448ac65
update deposit withdraw docs
Mar 17, 2026
a60d6ed
Merge pull request #81 from asterdex/v3-deposit-withdraw
aodyc Mar 17, 2026
d10d7c2
remove HMAC SHA256 from all v3 API docs
ivanzyzy Mar 18, 2026
ae5b8b1
Merge pull request #82 from asterdex/deleteHmac
ivanzyzy Mar 18, 2026
77994f3
testnetpy
ivanzyzy Mar 19, 2026
8813cdf
Merge pull request #83 from asterdex/testnetpy
ivanzyzy Mar 19, 2026
78162a6
docs: add user-withdraw-info and deposit-withdraw-history API endpoints
Mar 19, 2026
b3ece6f
Merge pull request #84 from asterdex/add-withdraw-info-api
aodyc Mar 19, 2026
6b94cf4
fix: update user-withdraw-info and deposit-withdraw-history to POST
Mar 19, 2026
060a4cd
Merge pull request #85 from asterdex/deposit-withdraw-fix
aodyc Mar 19, 2026
f27bd0d
add index weight references
vanessa-aster Mar 21, 2026
6501038
modify index weight references
vanessa-aster Mar 21, 2026
366eef2
Merge pull request #90 from asterdex/index-weight-doc
ivanzyzy Mar 21, 2026
f2f0b11
remove_abi
ivanzyzy Mar 24, 2026
cc00808
testnet py script
ivanzyzy Mar 25, 2026
efae812
Merge pull request #91 from asterdex/remove_abi
ivanzyzy Mar 25, 2026
61a040a
batchdeletedemo
ivanzyzy Mar 25, 2026
504c3b3
Merge pull request #92 from asterdex/batchdeletedemo
ivanzyzy Mar 25, 2026
dbb6e3b
batchdeletedemo
ivanzyzy Mar 25, 2026
2154b01
Merge pull request #93 from asterdex/batchdeletedemo
ivanzyzy Mar 25, 2026
5e3c89d
batchdeletedemo
ivanzyzy Mar 25, 2026
d6e26e1
Merge pull request #94 from asterdex/batchdeletedemo
ivanzyzy Mar 25, 2026
9d392db
aster chain doc update
vanessa-aster Mar 26, 2026
a126349
sol builder demo
ivanzyzy Mar 27, 2026
fef8bb7
Merge pull request #96 from asterdex/solfapi
ivanzyzy Mar 27, 2026
8f8fcd4
openorder add notes
vanessa-aster Mar 27, 2026
5625f68
openorder note fix
vanessa-aster Mar 27, 2026
f3e9735
Merge pull request #95 from asterdex/aster-chain-update
vanessa-aster Mar 27, 2026
8c50121
modify description for symbol
vanessa-aster Mar 28, 2026
0287f63
removeapikey
ivanzyzy Mar 28, 2026
8c458a4
Merge pull request #97 from asterdex/removeapikey
ivanzyzy Mar 28, 2026
b0d98d2
modify description for privacy
vanessa-aster Mar 28, 2026
84368fc
Merge pull request #98 from asterdex/aster-chain-update
vanessa-aster Mar 28, 2026
3ef429b
add MMP endpoints to EN and CN futures API v3 docs
ivanzyzy Mar 31, 2026
ec7f751
Merge pull request #99 from asterdex/mmp
ivanzyzy Apr 1, 2026
87fe70f
fix double-slash typo in DELETE /fapi/v3/mmp CN doc
ivanzyzy Apr 1, 2026
56eba1f
Merge pull request #100 from asterdex/mmp
ivanzyzy Apr 1, 2026
6d37097
add note
vanessa-aster Apr 1, 2026
6257ec4
add note
vanessa-aster Apr 1, 2026
240ce32
Merge pull request #102 from asterdex/aster-chain-update
vanessa-aster Apr 1, 2026
3f8a18c
docs: add V3 versions of user-withdraw-info and deposit-withdraw-hist…
Apr 3, 2026
db10775
Merge pull request #103 from asterdex/withdraw-info-v3
aodyc Apr 3, 2026
ccc7605
transactionHistory
ivanzyzy Apr 7, 2026
e47b33a
Merge pull request #106 from asterdex/transactionHistory
ivanzyzy Apr 7, 2026
cbed1de
new_dir
ivanzyzy Apr 7, 2026
e395ec7
chore: ignore .claude directory
ivanzyzy Apr 7, 2026
39e8743
docs: add Query Current Open Order endpoint and CN testnet API docs
ivanzyzy Apr 7, 2026
d3963ca
Merge pull request #107 from asterdex/new_dir
ivanzyzy Apr 7, 2026
558cee4
fix: fix Demo directory links to lowercase demo
ivanzyzy Apr 7, 2026
c5ab675
Merge pull request #108 from asterdex/new_dir
ivanzyzy Apr 7, 2026
8c2c5dd
docs: rewrite README with structure, quick start, and full doc links
ivanzyzy Apr 7, 2026
0b3b56c
docs: update README structure and doc links order
ivanzyzy Apr 7, 2026
e761f9a
Merge pull request #109 from asterdex/new_dir
ivanzyzy Apr 7, 2026
b78278f
docs: rewrite V3 Nonce Mechanism section across all docs (CN & EN)
ivanzyzy Apr 9, 2026
6d6d527
Merge pull request #111 from asterdex/update-nonce-mechanism
ivanzyzy Apr 9, 2026
44f4974
docs: add Bind Sub-Account API endpoint (EN & CN)
ivanzyzy Apr 10, 2026
0f1df26
Merge pull request #113 from asterdex/add-bind-sub-account-api
ivanzyzy Apr 10, 2026
8c94a2e
doc update
vanessa-aster Apr 13, 2026
1666896
Merge pull request #114 from asterdex/api_update
ivanzyzy Apr 13, 2026
8d4e1a8
docs: add Modify Order API endpoint (EN, EN testnet & CN testnet)
ivanzyzy Apr 16, 2026
8ed0958
docs: fix Modify Order quantity/price as optional (NO) across all docs
ivanzyzy Apr 16, 2026
93e0a74
docs: remove HMAC SHA256 labels from V3 API endpoint headings
ivanzyzy Apr 20, 2026
78bdefc
Merge pull request #118 from asterdex/remove-hmac-sha256-from-v3-docs
ivanzyzy Apr 20, 2026
3033e6a
docs: add STAKING_WITHDRAW/CLAIM/DELEGATE types to transactionHistory…
ivanzyzy Apr 24, 2026
8a91187
Merge pull request #119 from asterdex/docs/add-staking-types-to-trans…
ivanzyzy Apr 24, 2026
642b923
docs: add sub-account API endpoints to V3 docs (EN & CN)
ivanzyzy Apr 28, 2026
1395c6a
docs: sync auth section updates to all V3 docs
ivanzyzy Apr 28, 2026
b2fe0b1
add spot doc
vanessa-aster Apr 28, 2026
3f8dd84
Merge pull request #123 from asterdex/chain_doc_update
vanessa-aster Apr 28, 2026
5957c53
spot cn doc update
vanessa-aster Apr 28, 2026
457fc3a
Merge pull request #124 from asterdex/chain_doc_update
vanessa-aster Apr 28, 2026
165cad1
spot cn doc update
vanessa-aster Apr 28, 2026
22723dc
future doc update
vanessa-aster Apr 28, 2026
b36d452
Merge pull request #125 from asterdex/chain_doc_update
vanessa-aster Apr 28, 2026
926a66b
Merge pull request #122 from asterdex/docs/add-sub-account-api-v3
ivanzyzy Apr 28, 2026
156b157
docs: update modify order rule - quantity and price are both required
ivanzyzy May 7, 2026
ee3e2ed
Merge pull request #127 from asterdex/docs/update-modify-order-quanti…
ivanzyzy May 7, 2026
e3fb1c7
docs: update sub-account transfer scenarios and notes
ivanzyzy May 7, 2026
bea1206
Merge pull request #128 from asterdex/docs/update-sub-account-transfe…
ivanzyzy May 7, 2026
698b3f4
docs: add migrateUser and migrateUser/history API documentation
ivanzyzy May 11, 2026
93e2216
demo code
ivanzyzy May 11, 2026
dfe0f2f
Merge pull request #129 from asterdex/docs/add-migrate-user-asset-api
ivanzyzy May 11, 2026
0e10ef6
docs: add registerAndApproveAgent API documentation
ivanzyzy May 12, 2026
c80b5fd
docs: update signature instructions and simplify CHANGELOG
ivanzyzy May 12, 2026
cf0cccb
docs: clarify typed_data is EVM-only in signature instructions
ivanzyzy May 12, 2026
93922c9
docs: fix testnet chainId to 714 in EIP-712 domain
ivanzyzy May 12, 2026
464da4d
Merge pull request #130 from asterdex/docs/add-register-and-approve-a…
ivanzyzy May 14, 2026
70bf2fc
add_chase_order_and_bbo_api
bradx-cmyk May 19, 2026
7d42244
docs: add fapi/v3/stpMode endpoints and stpMode order parameter
ivanzyzy May 21, 2026
ead4e3b
Merge pull request #134 from asterdex/docs/add-stp-mode-api
ivanzyzy May 21, 2026
b1a96ff
strategy_api
ivanzyzy May 20, 2026
06e3641
docs: add aster-chain/v3/transfer endpoint (EN & CN)
ivanzyzy May 22, 2026
d2e89b4
docs: update CHANGELOG for 2026-05-21 STP mode entries
ivanzyzy May 22, 2026
b3696f9
Merge pull request #133 from asterdex/strategy_api
ivanzyzy May 22, 2026
866b7e5
docs: add Prediction API testnet documentation (EN & CN)
ivanzyzy May 26, 2026
c435a10
use prediction
ivanzyzy May 26, 2026
be1179d
use prediction
ivanzyzy May 26, 2026
8970802
Merge pull request #135 from asterdex/prediction_testnet
ivanzyzy May 26, 2026
6f363bc
stake
ivanzyzy May 27, 2026
43cbb35
Merge pull request #136 from asterdex/stake
ivanzyzy May 27, 2026
8ab8d0e
prediction_twap
ivanzyzy May 27, 2026
9da1763
prediction_twap
ivanzyzy May 27, 2026
a3e5cc9
prediction_twap
ivanzyzy May 27, 2026
8fadce8
Merge pull request #137 from asterdex/prediction_twap
ivanzyzy May 27, 2026
75d9061
add deposit withdraw
ivanzyzy May 28, 2026
c098a8a
remove transfer history, add estimate withdraw fee
ivanzyzy May 28, 2026
a836e02
remove spot deposit/withdraw history section
ivanzyzy May 28, 2026
2c6d87d
Merge pull request #138 from asterdex/chain_aster
ivanzyzy May 28, 2026
998a44e
prediction_prod
ivanzyzy May 29, 2026
811a935
Merge pull request #139 from asterdex/prediction_prod
ivanzyzy Jun 2, 2026
04ddfed
announcement
ivanzyzy Jun 5, 2026
bf2cef8
announcement
ivanzyzy Jun 5, 2026
9871f86
Merge pull request #140 from asterdex/announcement
ivanzyzy Jun 5, 2026
0401110
Harden demo scripts: imports, nonce, success check
Valisthea Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
.claude
70 changes: 0 additions & 70 deletions .idea/workspace.xml

This file was deleted.

111 changes: 111 additions & 0 deletions Aster API Overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Aster API V1 vs V3

This page provides a quick comparison between Aster `V1` and `V3`, focusing on authentication, endpoint structure, capability coverage, and the most important architectural value behind V3.

**`Starting from March 25, 2026, V1 new API Key creation is no longer supported. Existing API Keys will continue to work.`**


> **Key takeaways**
>
> 1. Authentication moves from `API Key + HMAC` to `API Wallet / Agent + Web3-style signing`
> 2. The futures structure is upgraded on top of `Aster L1`, giving `V3` stronger `Take Order` performance while consolidating the main paths into `/fapi/v3/*`

---

## Overview

### How To Understand It

- `V1` is the standard API Key model.
- `V3` introduces the API Wallet / Agent model, and its authentication flow is closer to on-chain signing.
- `V3` futures are built on top of `Aster L1`, which gives stronger `Take Order` performance.
- `V3` goes through the blockchain, which makes historical trades traceable in the future, with stronger security and visibility.
- `V3` uses `nonce` to prevent replay attacks, making requests more secure.
- `V3` supports `Noop`, which can cancel orders faster.
- Most business capabilities still exist in both versions.
- The biggest change is not order semantics, but the authentication layer.

---

## Authentication

### V1

In `V1`, authentication follows the typical `API Key + Secret` model:

- Send `X-MBX-APIKEY` in the request header
- Include `timestamp` in request parameters
- Optionally include `recvWindow`
- Generate `signature` using `HMAC SHA256`

The signing payload is usually based on request parameters, which means `query string + request body`.

### V3

In `V3`, authentication is no longer centered only around `apiSecret`.

In addition to business parameters, requests also include:

- `user`: main account wallet address
- `signer`: API wallet address
- `nonce`: microsecond timestamp
- `signature`: signed by the API wallet private key
- `timestamp`

The signing flow can be understood as:

1. Convert all business parameters into strings
2. Sort them by ASCII key order
3. Encode them together with `user`, `signer`, and `nonce`
4. Generate a Keccak hash
5. Sign it with ECDSA using the API wallet private key

`nonce` also plays an important role in V3, because it prevents replay attacks and makes requests more secure.

> **Why this matters**
>
> `V1` is well suited to the standard API Key integration model.
> `V3` is built around signer identity and is better aligned with the Aster L1 architecture.

### Core Value Of V3

- `V3` futures are built on top of `Aster L1`, giving stronger `Take Order` performance.
- `V3` goes through the blockchain, so historical trades can be traced in the future, with stronger security and visibility.
- `V3` uses `nonce` to prevent replay and make requests more secure.
- `V3` supports `Noop`, which can cancel orders faster.

## Migration Notes

A practical migration order is:

1. Build a dedicated signing module first
2. Centralize the authentication context:
- `user`
- `signer`
- `signerPrivateKey`
- `timestamp`
- `nonce`
3. Get one simple order or query flow working first
4. Validate the signing logic with a simple trade flow
5. Then move to batch and fund-related operations

### Common Mistakes

The most common issues during V3 migration are:

- incorrect parameter sorting
- mixing milliseconds and microseconds
- forgetting `user` or `signer`
- assuming V3 is still plain HMAC
- relying too much on endpoint titles instead of the authentication section

---

- `V1` is fundamentally the standard `API Key` model.
- `V3` introduces the `API Wallet / Agent` model, and its authentication flow is closer to on-chain signing.
- The two versions remain broadly aligned in business capability, with the main difference concentrated in the authentication layer.
- On futures, `V3` is built on top of `Aster L1`, which gives it stronger `Take Order` performance and a more unified endpoint structure.
- `V3` goes through the blockchain, making future historical trade traceability possible with stronger security and visibility.
- `V3` uses `nonce` to prevent replay and improve request security.
- `V3` supports `Noop`, which can cancel orders faster.
- Fund-related APIs still require extra attention because they often involve additional wallet-based signing.
102 changes: 102 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Changelog

## 2026-05-26

### Added

#### Prediction API Testnet Documentation / 预测市场 API 测试网文档

Added full API reference documentation for the Prediction API on testnet (`https://papi.asterdex-testnet.com`), covering:

- **Market data**: `GET /api/v3/prediction/ping`, `GET /api/v3/prediction/time`, `GET /api/v3/prediction/exchangeInfo`, depth, trades, klines, tickers, best order book
- **Trading**: `POST /api/v3/order` (Place order), `DELETE /api/v3/order` (Cancel order), `GET /api/v3/order`, open orders, all orders, cancel all open orders
- **Prediction market**: mint (`POST /api/v3/prediction/mint`), burn (`POST /api/v3/prediction/burn`), positions (`GET /api/v3/prediction/positionRisk`), position history, settlement history
- **Account**: perp-spot transfer, withdraw fee, withdraw, account info, trade history
- **WebSocket streams**: trades, klines, tickers, order book depth (limited & incremental), listen key lifecycle, `ACCOUNT_UPDATE` payload

Documentation available in both English (`V3(Recommended)/EN/aster-finance-prediction-api-tesetnet.md`) and Chinese (`V3(Recommended)/中文/aster-finance-prediction-api-testnet.md`).

---

## 2026-05-21

### Added

#### `POST /aster-chain/v3/transfer` — Transfer to Address / 转账至地址

A new WITHDRAW-authenticated endpoint for transferring assets to another registered Aster Chain user address. Returns `transferId`, `asset`, `amount`, `toAddress`, `timestamp`, and `status`.

#### STP Mode APIs / 自成交防止模式接口

- `POST /fapi/v3/stpMode` — Change STP Mode / 更改STP模式 (TRADE, weight 1)
- `GET /fapi/v3/stpMode` — Get Current STP Mode / 查询STP模式 (USER_DATA, weight 30)

Supports `EXPIRE_TAKER`, `EXPIRE_MAKER`, `EXPIRE_BOTH`. Added `stpMode` optional parameter to `POST /fapi/v3/order` for per-order STP override.


### Added

#### `POST /fapi/v3/stpMode` — Change STP Mode / 更改STP模式

A new TRADE endpoint that sets the account-level **Self-Trade Prevention (STP) mode** applied to all orders by default. Accepted values: `EXPIRE_TAKER`, `EXPIRE_MAKER`, `EXPIRE_BOTH`.

#### `GET /fapi/v3/stpMode` — Get Current STP Mode / 查询STP模式

A new USER_DATA endpoint that returns the account's current STP mode.

### Changed

#### `POST /fapi/v3/order` — New Order: added optional `stpMode` parameter

Added `stpMode` (ENUM, optional) to the place-order parameter list. When specified, it overrides the account-level STP default for that individual order.

---

## 2026-05-20

### Added

#### Strategy Order APIs / 策略订单接口

- `POST /fapi/v3/placeStrategyOrder` — Place Strategy Order / 策略下单
- `POST /fapi/v3/updateStrategyOrder` — Update Strategy Order / 更新策略订单
- `GET /fapi/v3/strategyOrder` — Query Strategy Open Order / 查询策略当前挂单
- `GET /fapi/v3/strategyOrder/history` — Query Strategy History Order / 查询策略历史订单

Supports OTO, OCO, and OTOCO strategy types.

---

## 2026-05-19

### Added

#### `POST /fapi/v3/chase` — Place Chase Order / 下追单

A new public endpoint that **places a BBO-pegged GTX limit order with automatic price tracking**. The strategy service polls each tick and re-pegs the order to `bid1 − chaseOffset` (BUY) or `ask1 + chaseOffset` (SELL). The chase auto-cancels when the market moves beyond `maxChaseOffset` from the original BBO. Supports `priceLimit`, `quantityUnit` (`BASE` / `QUOTE`), and optional `maxChaseOffset` in `ABSOLUTE` or `PERCENTAGE` units.

### Changed

#### `PUT /fapi/v3/order` — Modify Order: clarified BBO-pegged behavior

Added a note that BBO-pegged orders (placed with `pegPriceType = COUNTERPARTY_1 / QUEUE_1`) cannot have their price re-resolved via plain modify — to continuously track the BBO use a Chase order (`POST /fapi/v3/chase`).

---

## 2026-05-12

### Added

#### `POST /fapi/v3/registerAndApproveAgent` — Register and Approve Agent / 注册并授权 Agent

A new public endpoint that **registers an API agent account and grants trading/withdrawal permissions in a single atomic call**.

---

## 2025-xx-xx

### Added

#### `POST /fapi/v3/asset/migrateUser` — Migrate User Assets / 用户资产迁移

#### `GET /fapi/v3/asset/migrateUser/history` — Migrate User Assets History / 用户资产迁移历史
50 changes: 46 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,50 @@
# API Documentation for Aster Finance
# Aster API Docs

[Aster Finance API Document](./aster-finance-api.md)
Official API documentation for Aster.

# Aster Finance API 文档
## 🚀 Quick Start

[Aster Finance API 文档](./aster-finance-api_CN.md)
- Use **V3 (Recommended)** for all new integrations
- Starting from **March 25, 2026**, V1 new API Key creation is no longer supported. Existing API Keys will continue to work.
- Choose **EN** / **中文** based on your preference

## 📖 Docs

### API Overview

- [Aster API Overview](./Aster%20API%20Overview.md)

### V3 Futures API (Recommended)

- [Futures API V3 (EN)](./V3(Recommended)/EN/aster-finance-futures-api-v3.md)
- [Futures API V3 (中文)](./V3(Recommended)/中文/aster-finance-futures-api-v3_CN.md)
- [Futures Testnet API V3 (EN)](./V3(Recommended)/EN/aster-finance-futures-api-testnet.md)
- [Futures Testnet API V3 (中文)](./V3(Recommended)/中文/aster-finance-futures-api-testnet_CN.md)

### V3 Spot API (Recommended)

- [Spot API V3 (EN)](./V3(Recommended)/EN/aster-finance-spot-api-v3.md)
- [Spot API V3 (中文)](./V3(Recommended)/中文/aster-finance-spot-api_CN-v3.md)
- [Spot Testnet API V3 (EN)](./V3(Recommended)/EN/aster-finance-spot-api-testnet.md)
- [Spot Testnet API V3 (中文)](./V3(Recommended)/中文/aster-finance-spot-api-testnet_CN.md)

### V1 Futures API (Legacy)

- [Futures API V1 (EN)](./V1(Legacy)/EN/aster-finance-futures-api.md)
- [Futures API V1 (中文)](./V1(Legacy)/中文/aster-finance-futures-api_CN.md)

### V1 Spot API (Legacy)

- [Spot API V1 (EN)](./V1(Legacy)/EN/aster-finance-spot-api.md)
- [Spot API V1 (中文)](./V1(Legacy)/中文/aster-finance-spot-api_CN.md)

### RPC

- [Aster Chain RPC](./RPC/aster-chain-rpc.md)
- [Aster Chain RPC 文档](./RPC/aster-chain-rpc_CN.md)

### Demo

- [API Key Registration](./demo/aster-api-key-registration.md)
- [Spot Asset Consolidation](./demo/consolidation.js)
- [Deposit & Withdrawal](./demo/aster-deposit-withdrawal.md)
Loading