Skip to main content

AsterDEX API: Deposits, Withdrawals and Simple Mode Trade History

AsterDEX records two kinds of activity on chains that Bitquery indexes. Deposits and withdrawals on BNB Chain, Ethereum and Arbitrum pass through the Aster Deposit Bridge, and Bitquery returns each one as a token transfer and as a decoded Deposit or Withdraw event. Order-book trading runs on Aster Chain, Aster's own Layer 1, and Bitquery does not index Aster Chain. Orders, fills, positions, funding and liquidations from the order book are therefore not available through Bitquery. The Simple Mode (1001x) contract on BNB Chain recorded every trade on-chain until it stopped opening new trades in May 2026, and its history stays available in the archive dataset.

Perp DEX data on other venues

For venues whose orders, fills, positions, funding and liquidations are on-chain, see the Perp DEX API section. It covers Hyperliquid and Solana perpetuals.

What AsterDEX puts on-chain​

ActivityWhere Aster records itIn Bitquery
DepositsAster Deposit Bridge on BNB Chain, Ethereum, Arbitrum, Solana and SuiYes for BNB Chain, Ethereum and Arbitrum, in Transfers and Events
WithdrawalsThe same bridge contracts, sent by Aster's own walletsYes, in Transfers and Events
Order-book orders, fills, positions, funding and liquidationsAster ChainNo
Simple Mode (1001x) opens, closes, fees, take-profit, stop-loss and liquidationsSimple Mode contract on BNB ChainYes, as history in the archive dataset
ALP pool mints, burns and stakingSimple Mode contract on BNB ChainYes

Aster's documentation says that traders who turn on Account Privacy send their orders through stealth addresses, so those trades do not link back to the wallet that deposited. A deposit on BNB Chain shows the wallet and the amount. It does not show what that money traded afterwards.

AsterDEX contract addresses​

ContractChainAddressnetwork value
Aster Deposit BridgeBNB Chain0x128463A60784c4D3f46c23Af3f65Ed859Ba87974bsc
Aster Deposit BridgeEthereum0x604DD02d620633Ae427888d41bfd15e38483736Eeth
Aster Deposit BridgeArbitrum0x9E36CB86a159d479cEd94Fa05036f235Ac40E1d5arbitrum
Simple Mode (1001x) contractBNB Chain0x1b6F2d3844C6ae7D56ceb3C3643b9060ba28FEb0bsc

Aster lists the bridge addresses, including Solana and Sui, on its smart contracts page. The Ethereum and Arbitrum bridges emit the same Deposit and Withdraw events as the BNB Chain bridge, and Bitquery decodes them with the same names. Every bridge query below works on Ethereum or Arbitrum once you change network and the address.

Deposit Bridge events​

The bridge's verified source code defines Deposit, Withdraw, ReceiveETH, DepositFailed, WithdrawCanceled and WithdrawFee, plus admin events such as AddToken and RemoveToken. Most deposits are sent by the trader's own wallet. The depositFor function lets another address deposit on a trader's behalf, and the event then names the trader as payer while the transaction comes from the other address. Withdrawals are sent by a small set of Aster wallets, which pay out to the wallet the trader named.

Bitquery decodes Deposit and Withdraw with argument names borrowed from another contract that has the same event signature. The values are right and the names are wrong. Read each argument by its position:

EventName in BitqueryName in Aster's sourceWhat it holds
DepositpayeraccountWallet credited with the deposit
DepositreceivercurrencyToken contract that was deposited
DepositisBaseTokenisNativetrue for a deposit in the chain's native coin
DepositamountamountRaw amount, before token decimals
DepositlpTokenAmountbrokerBroker (referral) ID
WithdrawcurTimeidAster's withdrawal ID
WithdrawtokentoWallet that receives the funds
WithdrawusercurrencyToken contract that was withdrawn
WithdrawamountamountRaw amount, before the fee
WithdrawbalancefeeFee Aster keeps, in the same token

The receiving wallet gets amount minus fee. When isBaseToken is true, the deposit is native BNB on BNB Chain or ETH on Ethereum and Arbitrum. Use the Transfers queries below to get symbols, decimal amounts and USD values without decoding raw integers.

Latest AsterDEX deposits and withdrawals​

This query returns the 10 newest deposits and the 10 newest withdrawals on the BNB Chain bridge from the last hour. A deposit is a transfer whose receiver is the bridge, and a withdrawal is a transfer whose sender is the bridge. Amount is already adjusted for decimals, and native BNB shows SmartContract as 0x.

query AsterVaultLatestFlows {
EVM(network: bsc, dataset: realtime) {
deposits: Transfers(
where: {
Block: { Time: { since_relative: { hours_ago: 1 } } }
Transfer: { Receiver: { is: "0x128463a60784c4d3f46c23af3f65ed859ba87974" } }
}
orderBy: { descending: Block_Time }
limit: { count: 10 }
) {
Block { Time }
Transaction { Hash }
Transfer {
Sender
Amount
AmountInUSD
Currency { Symbol SmartContract }
}
}
withdrawals: Transfers(
where: {
Block: { Time: { since_relative: { hours_ago: 1 } } }
Transfer: { Sender: { is: "0x128463a60784c4d3f46c23af3f65ed859ba87974" } }
}
orderBy: { descending: Block_Time }
limit: { count: 10 }
) {
Block { Time }
Transaction { Hash }
Transfer {
Receiver
Amount
AmountInUSD
Currency { Symbol SmartContract }
}
}
}
}

AsterDEX net flows by token​

This query totals deposits and withdrawals per token over the last 24 hours, with the number of distinct depositing and receiving wallets. Compare usd_in with usd_out for each token to see net flow.

query AsterVaultNetFlowsByToken {
EVM(network: bsc, dataset: realtime) {
deposits: Transfers(
where: {
Block: { Time: { since_relative: { hours_ago: 24 } } }
Transfer: { Receiver: { is: "0x128463a60784c4d3f46c23af3f65ed859ba87974" } }
}
orderBy: { descendingByField: "usd_in" }
limit: { count: 10 }
) {
Transfer { Currency { Symbol SmartContract } }
deposits: count
depositors: uniq(of: Transfer_Sender)
amount_in: sum(of: Transfer_Amount)
usd_in: sum(of: Transfer_AmountInUSD)
}
withdrawals: Transfers(
where: {
Block: { Time: { since_relative: { hours_ago: 24 } } }
Transfer: { Sender: { is: "0x128463a60784c4d3f46c23af3f65ed859ba87974" } }
}
orderBy: { descendingByField: "usd_out" }
limit: { count: 10 }
) {
Transfer { Currency { Symbol SmartContract } }
withdrawals: count
recipients: uniq(of: Transfer_Receiver)
amount_out: sum(of: Transfer_Amount)
usd_out: sum(of: Transfer_AmountInUSD)
}
}
}

Some transfers are Aster moving its own funds rather than a trader deposit or withdrawal. For example, the bridge sends USDT to the USDF Minting contract 0xC271fc70dD9E678ac1AB632f797894fe4BE2C345. Exclude the contracts on Aster's smart contracts page when you need trader flows only.

Deposit and Withdraw events with broker IDs and fees​

The Transfers cube gives amounts and symbols. The decoded events add what transfers lack: the broker ID on each deposit, and the withdrawal ID and fee on each withdrawal. Read the arguments with the table in Deposit Bridge events.

query AsterVaultEvents {
EVM(network: bsc, dataset: realtime) {
Events(
where: {
Block: { Time: { since_relative: { hours_ago: 1 } } }
LogHeader: { Address: { is: "0x128463a60784c4d3f46c23af3f65ed859ba87974" } }
Log: { Signature: { Name: { in: ["Deposit", "Withdraw"] } } }
}
orderBy: { descending: Block_Time }
limit: { count: 20 }
) {
Block { Time }
Transaction { Hash From }
Log { Signature { Name } }
Arguments {
Name
Type
Value {
... on EVM_ABI_Address_Value_Arg { address }
... on EVM_ABI_BigInt_Value_Arg { bigInteger }
... on EVM_ABI_Boolean_Value_Arg { bool }
}
}
}
}
}

If you filter on one of these names, such as payer, test the query again after Bitquery schema updates. A fix to the decoding would rename the argument, and the filter would stop matching.

One wallet's AsterDEX deposits and withdrawals​

Pass a wallet in $wallet to list its transfers into and out of the bridge over the last 24 hours. For a longer window, switch to dataset: combined and filter Block: { Date: { since: "YYYY-MM-DD" } }.

A transfer shows the address that moved the tokens. When another contract deposits for the wallet through depositFor, the transfer comes from that contract, and the wallet appears only as payer in the Deposit event.

query AsterWalletFlows($wallet: String = "0x909c245327e82f37a4a68edb7c5bb2910f18bdc8") {
EVM(network: bsc, dataset: realtime) {
Transfers(
where: {
Block: { Time: { since_relative: { hours_ago: 24 } } }
any: [
{
Transfer: {
Sender: { is: $wallet }
Receiver: { is: "0x128463a60784c4d3f46c23af3f65ed859ba87974" }
}
}
{
Transfer: {
Sender: { is: "0x128463a60784c4d3f46c23af3f65ed859ba87974" }
Receiver: { is: $wallet }
}
}
]
}
orderBy: { descending: Block_Time }
limit: { count: 50 }
) {
Block { Time }
Transaction { Hash }
Transfer {
Sender
Receiver
Amount
AmountInUSD
Currency { Symbol SmartContract }
}
}
}
}

Stream AsterDEX deposits and withdrawals​

This subscription pushes every transfer into or out of the BNB Chain bridge as soon as Bitquery indexes the block. Run it over WebSocket at wss://streaming.bitquery.io/graphql.

subscription AsterVaultLiveFlows {
EVM(network: bsc) {
Transfers(
where: {
any: [
{ Transfer: { Receiver: { is: "0x128463a60784c4d3f46c23af3f65ed859ba87974" } } }
{ Transfer: { Sender: { is: "0x128463a60784c4d3f46c23af3f65ed859ba87974" } } }
]
}
) {
Block { Time }
Transaction { Hash }
Transfer {
Sender
Receiver
Amount
AmountInUSD
Currency { Symbol SmartContract }
}
}
}
}

Simple Mode (1001x) trade history on BNB Chain​

Simple Mode ran every trade through the contract 0x1b6F2d3844C6ae7D56ceb3C3643b9060ba28FEb0, and each step emitted a decoded event. The contract stopped opening new trades in May 2026, and the last closes ran in August 2026. It still emits ALP pool exits (BurnAlp, BurnRemoveLiquidity, BurnFee) and UnStake. Query Simple Mode history with dataset: archive and a date range that ends before June 2026. The realtime dataset returns no trades for this contract.

How a Simple Mode trade appears on-chain​

StepEventsSent by
Order placedMarketPendingTrade for a market order, OpenLimitOrder for a limit orderThe trader's wallet
Order filledOpenMarketTrade, plus ExecuteLimitOrderSuccessful when a limit order fillsAn Aster keeper wallet
Stop-loss or take-profit changedUpdateTradeSl, UpdateTradeTp, UpdateOrderSl, UpdateOrderTpThe trader's wallet
Margin changedUpdateMarginThe trader's wallet
Closed by the traderCloseTradeSuccessful, CloseTradeReceivedAn Aster keeper wallet
Closed by take-profit, stop-loss or liquidationExecuteCloseSuccessfulAn Aster keeper wallet
Fees and fundingOpenFee, CloseFee, FundingFeeAddLiquidity, UpdatePairAccFundingFeePerShareEmitted with the trade
Pair totalsUpdatePairPositionInfoEmitted with the trade

Keeper wallets send most of the transactions, so Transaction.From is often an Aster wallet and not the trader. The trader is the user argument of each event.

ExecuteCloseSuccessful carries an executionType argument: 0 is take-profit, 1 is stop-loss and 2 is liquidation. A close the trader asks for emits CloseTradeSuccessful instead. Both close events carry a CloseInfo tuple, which Bitquery returns as five CloseInfo arguments in this order: close price, funding fee, close fee, PnL and holding fee. The values are raw integers.

The archive and combined datasets are not part of the free trial, so the queries in this section need a paid plan.

Simple Mode event counts​

This query counts every event the contract emitted in a month, grouped by event name. Change the dates to cover any period before June 2026.

query AsterSimpleModeEventCounts {
EVM(network: bsc, dataset: archive) {
Events(
where: {
Block: { Date: { since: "2026-04-01", till: "2026-04-30" } }
LogHeader: { Address: { is: "0x1b6F2d3844C6ae7D56ceb3C3643b9060ba28FEb0" } }
}
orderBy: { descendingByField: "count" }
limit: { count: 50 }
) {
Log { Signature { Name Signature } }
count
}
}
}

Simple Mode liquidations​

This query returns liquidations: ExecuteCloseSuccessful events with executionType equal to 2. Use 0 for take-profit closes and 1 for stop-loss closes.

query AsterSimpleModeLiquidations {
EVM(network: bsc, dataset: archive) {
Events(
where: {
Block: { Date: { since: "2026-04-01", till: "2026-04-30" } }
LogHeader: { Address: { is: "0x1b6F2d3844C6ae7D56ceb3C3643b9060ba28FEb0" } }
Log: { Signature: { Name: { is: "ExecuteCloseSuccessful" } } }
Arguments: {
includes: { Name: { is: "executionType" }, Value: { UnsignedInteger: { eq: 2 } } }
}
}
orderBy: { descending: Block_Time }
limit: { count: 20 }
) {
Block { Time }
Transaction { Hash }
Arguments {
Name
Type
Value {
... on EVM_ABI_Address_Value_Arg { address }
... on EVM_ABI_Bytes_Value_Arg { hex }
... on EVM_ABI_Integer_Value_Arg { integer }
... on EVM_ABI_BigInt_Value_Arg { bigInteger }
}
}
}
}
}

One trader's Simple Mode history​

Filter on the user argument to get every event for one trader, whoever sent the transaction.

query AsterSimpleModeTrader($trader: String = "0x37f05b741793b869f26277df5620bcd805a06afe") {
EVM(network: bsc, dataset: archive) {
Events(
where: {
Block: { Date: { since: "2026-04-01", till: "2026-04-30" } }
LogHeader: { Address: { is: "0x1b6F2d3844C6ae7D56ceb3C3643b9060ba28FEb0" } }
Arguments: {
includes: { Name: { is: "user" }, Value: { Address: { is: $trader } } }
}
}
orderBy: { descending: Block_Time }
limit: { count: 50 }
) {
Block { Time }
Transaction { Hash From }
Log { Signature { Name } }
Arguments {
Name
Value {
... on EVM_ABI_Address_Value_Arg { address }
... on EVM_ABI_Bytes_Value_Arg { hex }
... on EVM_ABI_Integer_Value_Arg { integer }
... on EVM_ABI_BigInt_Value_Arg { bigInteger }
... on EVM_ABI_Boolean_Value_Arg { bool }
}
}
}
}
}

Full lifecycle of one Simple Mode trade​

Every Simple Mode order and trade has a hash. Pass it in $tradeHash to get each event that carries it as tradeHash or orderHash, in time order. Argument filters scan values that are not indexed, so keep the date range as narrow as you can.

query AsterSimpleModeTradeLifecycle($tradeHash: String = "0x4eabfc07d7e193076a8deb00dae378092f6ed701b62df06357f3e7d97a103526") {
EVM(network: bsc, dataset: archive) {
Events(
where: {
Block: { Date: { since: "2026-04-01", till: "2026-04-30" } }
LogHeader: { Address: { is: "0x1b6F2d3844C6ae7D56ceb3C3643b9060ba28FEb0" } }
Arguments: {
includes: { Name: { in: ["tradeHash", "orderHash"] }, Value: { Bytes: { is: $tradeHash } } }
}
}
orderBy: { ascending: Block_Time }
limit: { count: 50 }
) {
Block { Time }
Transaction { Hash }
Log { Signature { Name } }
Arguments {
Name
Value {
... on EVM_ABI_Address_Value_Arg { address }
... on EVM_ABI_Bytes_Value_Arg { hex }
... on EVM_ABI_Integer_Value_Arg { integer }
... on EVM_ABI_BigInt_Value_Arg { bigInteger }
... on EVM_ABI_Boolean_Value_Arg { bool }
}
}
}
}
}

Simple Mode trading and pool events​

This table lists the trading, fee, funding, pool and prediction events the contract emitted. The contract also emits admin events, such as DiamondCut, UpdateFeeConfig, RoleGranted and Paused. Its oracle events, such as PriceUpdated, RequestPrice and RequestPriceV2, are not decoded by Bitquery and appear with an empty Name.

Event nameSignature
AddMarginPoolBalanceAddMarginPoolBalance(address,address,uint256)
BurnAlpBurnAlp(address,address,address,uint256,uint256)
BurnFeeBurnFee(address,address,uint256,uint256,uint256,uint256)
BurnRemoveLiquidityBurnRemoveLiquidity(address,address,uint256)
CancelLimitOrderCancelLimitOrder(address,bytes32)
CloseFeeCloseFee(address,uint256,uint256,uint24,uint256,uint256)
CloseTradeAddLiquidityCloseTradeAddLiquidity(address,uint256)
CloseTradeReceivedCloseTradeReceived(address,bytes32,address,uint256)
CloseTradeRemoveLiquidityCloseTradeRemoveLiquidity(address,uint256)
CloseTradeSuccessfulCloseTradeSuccessful(address,bytes32,(uint64,int96,uint96,int96,uint96))
ExecuteCloseRejectedExecuteCloseRejected(address,bytes32,uint8,uint64,uint64)
ExecuteCloseSuccessfulExecuteCloseSuccessful(address,bytes32,uint8,(uint64,int96,uint96,int96,uint96))
ExecuteLimitOrderRejectedExecuteLimitOrderRejected(address,bytes32,uint8)
ExecuteLimitOrderSuccessfulExecuteLimitOrderSuccessful(address,bytes32)
FundingFeeAddLiquidityFundingFeeAddLiquidity(address,uint256)
LimitOrderRefundLimitOrderRefund(address,bytes32,uint8)
MarketPendingTradeMarketPendingTrade(address,bytes32,(address,bool,address,uint96,uint80,uint64,uint64,uint64,uint24))
MintAddLiquidityMintAddLiquidity(address,address,uint256)
MintAlpMintAlp(address,address,uint256,uint256)
MintFeeMintFee(address,address,uint256,uint256,uint256,uint256)
OpenFeeOpenFee(address,uint256,uint256,uint24,uint256,uint256)
OpenLimitOrderOpenLimitOrder(address,bytes32,(address,bool,address,uint96,uint80,uint64,uint64,uint64,uint24))
OpenMarketTradeOpenMarketTrade(address,bytes32,(address,uint32,uint64,address,address,uint96,uint64,uint64,uint24,bool,uint96,int256,uint96,uint40,uint80,uint40,uint256))
PendingPredictionRefundPendingPredictionRefund(address,uint256,uint8)
PendingTradeRefundPendingTradeRefund(address,bytes32,uint8)
PredictAndBetPredictAndBet(address,uint256,(address,uint96,address,uint96,address,uint96,uint32,uint64,uint40,uint24,bool,uint8))
PredictAndBetPendingPredictAndBetPending(address,uint256,(address,uint96,address,uint96,address,uint64,uint24,bool,uint128,uint8))
PredictionCloseFeePredictionCloseFee(address,uint256,uint256,uint24,uint256,uint256)
SettlePredictionRejectSettlePredictionReject(uint256,uint8,uint256)
SettlePredictionSuccessfulSettlePredictionSuccessful(uint256,bool,uint256,address,uint256,uint256)
StakeStake(address,uint256)
UnStakeUnStake(address,uint256)
UpdateMarginUpdateMargin(address,bytes32,uint256,uint256)
UpdateOrderSlUpdateOrderSl(address,bytes32,uint256,uint256)
UpdateOrderTpUpdateOrderTp(address,bytes32,uint256,uint256)
UpdatePairAccFundingFeePerShareUpdatePairAccFundingFeePerShare(address,uint256,int256,uint256)
UpdatePairPositionInfoUpdatePairPositionInfo(address,uint256,uint256,uint256,int256,uint64,uint64)
UpdateSlippageConfigUpdateSlippageConfig(uint16,uint8,uint256,uint256,uint16,uint16,uint256,uint256)
UpdateTradeSlUpdateTradeSl(address,bytes32,uint256,uint256)
UpdateTradeTpUpdateTradeTp(address,bytes32,uint256,uint256)
WithdrawRevenueWithdrawRevenue(address,address,uint256)

API key, free trial and pricing​

Create an access token at account.bitquery.io and follow how to generate a token. The free trial runs for seven days and includes 1,000 API points, 100 MCP credits and two simultaneous streams, on real-time data only. The bridge queries and the subscription on this page work in the trial. The Simple Mode history queries use archive and need a paid plan. Subscriptions need streams, which the trial and the Pro, Scale and Enterprise plans include and the Personal plan does not. Request rate limits by plan are 30 a minute on Personal, 90 on Pro and 240 on Scale, with custom limits on Enterprise; see rate limits. Points and streams are explained on how billing works, and plan prices are on the pricing page.

Frequently Asked Questions

Does AsterDEX have an API?

Aster publishes its own REST and WebSocket API for its order book, covering market data and trading. Bitquery covers the on-chain side: deposits and withdrawals through the Aster Deposit Bridge on BNB Chain, Ethereum and Arbitrum, and Simple Mode (1001x) trade history on BNB Chain.

What data does AsterDEX put on-chain?

Deposits and withdrawals through the Aster Deposit Bridge, and the full trade history of the Simple Mode (1001x) contract on BNB Chain. Order-book trading runs on Aster Chain, Aster's own Layer 1, which Bitquery does not index.

Can I get AsterDEX order-book trades, positions or liquidations from Bitquery?

No. Order-book orders, fills, positions, funding and liquidations live on Aster Chain, which Bitquery does not index. Liquidations from Simple Mode are available as ExecuteCloseSuccessful events with executionType 2 in the archive dataset.

What is the AsterDEX contract address on BNB Chain?

The Aster Deposit Bridge on BNB Chain is 0x128463A60784c4D3f46c23Af3f65Ed859Ba87974. The Simple Mode (1001x) trading contract is 0x1b6F2d3844C6ae7D56ceb3C3643b9060ba28FEb0. The bridge is 0x604DD02d620633Ae427888d41bfd15e38483736E on Ethereum and 0x9E36CB86a159d479cEd94Fa05036f235Ac40E1d5 on Arbitrum.

Why do the Deposit and Withdraw argument names look wrong?

Bitquery decodes these events with names from another contract that shares the same event signature. The values are correct. In Deposit, payer is the depositing wallet, receiver is the token, isBaseToken means native coin and lpTokenAmount is the broker ID. In Withdraw, curTime is the withdrawal ID, token is the receiving wallet, user is the token and balance is the fee.

How do I track one wallet's AsterDEX deposits and withdrawals?

Query EVM Transfers on the bridge's network where the wallet sends to the bridge address or the bridge sends to the wallet. Use the realtime dataset for recent activity and combined with a date filter for longer history. Deposits another contract makes for the wallet through depositFor show the wallet only as payer in the Deposit event.

Is the AsterDEX Simple Mode (1001x) contract still active?

It stopped opening new trades in May 2026, the last closes ran in August 2026, and it now emits only ALP pool exits and unstakes. Its full trade history stays queryable with dataset archive and a date range that ends before June 2026.

Why is Transaction.From not the trader in Simple Mode events?

Aster keeper wallets send the transactions that fill and close Simple Mode trades. The trader is the user argument of each event, so filter on that argument to follow one trader.

Support​

For technical support, contact the Bitquery team on Telegram or open a ticket on the Bitquery support portal.

Build with Bitquery

Ready to run this in production?

Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.