# Wallet Data

Accounts, positions, trades, etc.

## GET /wallet/{address}/accounts

> Get wallet accounts

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/wallet/{address}/accounts":{"get":{"summary":"Get wallet accounts","operationId":"getWalletAccounts","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"List of accounts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","$id":"#Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"Account":{"title":"Account","$id":"#Account","type":"object","required":["accountId","name","type"],"properties":{"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/AccountType"}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","$id":"#UnsignedInteger","type":"integer","minimum":0},"AccountType":{"title":"AccountType","$id":"#AccountType","type":"string","enum":["MAINPERP","SUBPERP","SPOT"],"description":"SPOT = account that can only trade spot, MAINPERP = main perp account, SUBPERP = sub perp account"},"RequestError":{"title":"RequestError","$id":"#RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","$id":"#RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND","NO_ACCOUNTS_FOUND","NO_PRICES_FOUND_FOR_SYMBOL","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR"],"description":"Standardized error codes for API responses"},"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet spot execution busts

> Returns up to 100 spot execution busts (failed spot fills) for a given wallet.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/wallet/{address}/spotExecutionBusts":{"get":{"summary":"Get wallet spot execution busts","description":"Returns up to 100 spot execution busts (failed spot fills) for a given wallet.","operationId":"getWalletSpotExecutionBusts","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"},{"$ref":"#/components/parameters/StartTimeParam"},{"$ref":"#/components/parameters/EndTimeParam"}],"responses":{"200":{"description":"List of spot execution busts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpotExecutionBustList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},"StartTimeParam":{"name":"startTime","in":"query","required":false,"description":"Return results at or after this timestamp, in milliseconds (for pagination)","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"EndTimeParam":{"name":"endTime","in":"query","required":false,"description":"Return results at or before this timestamp, in milliseconds (for pagination)","schema":{"$ref":"#/components/schemas/UnsignedInteger"}}},"schemas":{"Address":{"title":"Address","$id":"#Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedInteger":{"title":"UnsignedInteger","$id":"#UnsignedInteger","type":"integer","minimum":0},"SpotExecutionBustList":{"title":"SpotExecutionBustList","$id":"#SpotExecutionBustList","type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SpotExecutionBust"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"additionalProperties":true},"SpotExecutionBust":{"title":"SpotExecutionBust","$id":"#SpotExecutionBust","type":"object","required":["symbol","accountId","exchangeId","makerAccountId","orderId","makerOrderId","qty","side","price","reason","timestamp"],"properties":{"symbol":{"$ref":"#/components/schemas/Symbol"},"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"makerAccountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Maker account ID (counterparty)"},"orderId":{"type":"string","description":"Order ID for the taker"},"makerOrderId":{"type":"string","description":"Order ID for the maker"},"qty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Failed base quantity"},"side":{"$ref":"#/components/schemas/Side"},"price":{"$ref":"#/components/schemas/SignedDecimal"},"reason":{"type":"string","description":"Hex-encoded revert reason bytes"},"timestamp":{"$ref":"#/components/schemas/UnsignedInteger","description":"Block timestamp (milliseconds)"}},"additionalProperties":true},"Symbol":{"title":"Symbol","$id":"#Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedDecimal":{"title":"UnsignedDecimal","$id":"#UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Side":{"title":"Side","$id":"#Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"SignedDecimal":{"title":"SignedDecimal","$id":"#Decimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"PaginationMeta":{"title":"PaginationMeta","$id":"#PaginationMeta","type":"object","required":["limit","count"],"properties":{"limit":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items requested"},"count":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items returned"},"endTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of last result, in milliseconds"},"startTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of first result, in milliseconds"}},"additionalProperties":true},"RequestError":{"title":"RequestError","$id":"#RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","$id":"#RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND","NO_ACCOUNTS_FOUND","NO_PRICES_FOUND_FOR_SYMBOL","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR"],"description":"Standardized error codes for API responses"},"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet perp executions

> Returns up to 100 perp executions for a given wallet.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/wallet/{address}/perpExecutions":{"get":{"summary":"Get wallet perp executions","description":"Returns up to 100 perp executions for a given wallet.","operationId":"getWalletPerpExecutions","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"},{"$ref":"#/components/parameters/StartTimeParam"},{"$ref":"#/components/parameters/EndTimeParam"}],"responses":{"200":{"description":"List of perpetual executions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerpExecutionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},"StartTimeParam":{"name":"startTime","in":"query","required":false,"description":"Return results at or after this timestamp, in milliseconds (for pagination)","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"EndTimeParam":{"name":"endTime","in":"query","required":false,"description":"Return results at or before this timestamp, in milliseconds (for pagination)","schema":{"$ref":"#/components/schemas/UnsignedInteger"}}},"schemas":{"Address":{"title":"Address","$id":"#Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedInteger":{"title":"UnsignedInteger","$id":"#UnsignedInteger","type":"integer","minimum":0},"PerpExecutionList":{"title":"PerpExecutionList","$id":"#PerpExecutionList","type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PerpExecution"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"additionalProperties":true},"PerpExecution":{"title":"PerpExecution","$id":"#PerpExecution","type":"object","required":["exchangeId","symbol","accountId","qty","side","fee","price","type","timestamp","sequenceNumber"],"properties":{"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"symbol":{"$ref":"#/components/schemas/Symbol"},"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"qty":{"$ref":"#/components/schemas/UnsignedDecimal"},"side":{"$ref":"#/components/schemas/Side"},"price":{"$ref":"#/components/schemas/SignedDecimal"},"fee":{"$ref":"#/components/schemas/SignedDecimal","description":"Total execution fee in rUSD"},"openingFee":{"$ref":"#/components/schemas/SignedDecimal","description":"Opening fee portion of the total fee in rUSD. Absent for position-extending executions."},"type":{"$ref":"#/components/schemas/ExecutionType"},"timestamp":{"$ref":"#/components/schemas/UnsignedInteger","description":"Execution timestamp (milliseconds)"},"sequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Execution sequence number, increases by 1 for every perp execution in reya chain"},"realizedPnl":{"$ref":"#/components/schemas/SignedDecimal","description":"Realized PnL from this execution in rUSD (priceVariationPnl + fundingPnl). Absent for position-extending executions."},"priceVariationPnl":{"$ref":"#/components/schemas/SignedDecimal","description":"PnL component from price movement in rUSD. Absent for position-extending executions."},"fundingPnl":{"$ref":"#/components/schemas/SignedDecimal","description":"PnL component from funding payments in rUSD. Absent for position-extending executions."}},"additionalProperties":true},"Symbol":{"title":"Symbol","$id":"#Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedDecimal":{"title":"UnsignedDecimal","$id":"#UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Side":{"title":"Side","$id":"#Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"SignedDecimal":{"title":"SignedDecimal","$id":"#Decimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"ExecutionType":{"title":"ExecutionType","$id":"#ExecutionType","type":"string","enum":["ORDER_MATCH","LIQUIDATION","ADL"],"description":"Type of execution"},"PaginationMeta":{"title":"PaginationMeta","$id":"#PaginationMeta","type":"object","required":["limit","count"],"properties":{"limit":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items requested"},"count":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items returned"},"endTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of last result, in milliseconds"},"startTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of first result, in milliseconds"}},"additionalProperties":true},"RequestError":{"title":"RequestError","$id":"#RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","$id":"#RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND","NO_ACCOUNTS_FOUND","NO_PRICES_FOUND_FOR_SYMBOL","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR"],"description":"Standardized error codes for API responses"},"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet spot executions

> Returns up to 100 spot executions for a given wallet.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/wallet/{address}/spotExecutions":{"get":{"summary":"Get wallet spot executions","description":"Returns up to 100 spot executions for a given wallet.","operationId":"getWalletSpotExecutions","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"},{"$ref":"#/components/parameters/StartTimeParam"},{"$ref":"#/components/parameters/EndTimeParam"}],"responses":{"200":{"description":"List of spot executions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpotExecutionList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},"StartTimeParam":{"name":"startTime","in":"query","required":false,"description":"Return results at or after this timestamp, in milliseconds (for pagination)","schema":{"$ref":"#/components/schemas/UnsignedInteger"}},"EndTimeParam":{"name":"endTime","in":"query","required":false,"description":"Return results at or before this timestamp, in milliseconds (for pagination)","schema":{"$ref":"#/components/schemas/UnsignedInteger"}}},"schemas":{"Address":{"title":"Address","$id":"#Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"UnsignedInteger":{"title":"UnsignedInteger","$id":"#UnsignedInteger","type":"integer","minimum":0},"SpotExecutionList":{"title":"SpotExecutionList","$id":"#SpotExecutionList","type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SpotExecution"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"additionalProperties":true},"SpotExecution":{"title":"SpotExecution","$id":"#SpotExecution","type":"object","required":["symbol","accountId","makerAccountId","qty","side","fee","price","type","timestamp","sequenceNumber"],"properties":{"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"symbol":{"$ref":"#/components/schemas/Symbol"},"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"makerAccountId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Maker account ID (counterparty)"},"orderId":{"type":"string","description":"Order ID for the taker"},"makerOrderId":{"type":"string","description":"Order ID for the maker"},"side":{"$ref":"#/components/schemas/Side"},"qty":{"$ref":"#/components/schemas/UnsignedDecimal"},"price":{"$ref":"#/components/schemas/SignedDecimal"},"fee":{"$ref":"#/components/schemas/SignedDecimal"},"type":{"$ref":"#/components/schemas/ExecutionType"},"timestamp":{"$ref":"#/components/schemas/UnsignedInteger","description":"Execution timestamp (milliseconds)"},"sequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Execution sequence number, increases by 1 for every spot execution in reya chain"}},"additionalProperties":true},"Symbol":{"title":"Symbol","$id":"#Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"Side":{"title":"Side","$id":"#Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"UnsignedDecimal":{"title":"UnsignedDecimal","$id":"#UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"SignedDecimal":{"title":"SignedDecimal","$id":"#Decimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"ExecutionType":{"title":"ExecutionType","$id":"#ExecutionType","type":"string","enum":["ORDER_MATCH","LIQUIDATION","ADL"],"description":"Type of execution"},"PaginationMeta":{"title":"PaginationMeta","$id":"#PaginationMeta","type":"object","required":["limit","count"],"properties":{"limit":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items requested"},"count":{"$ref":"#/components/schemas/UnsignedInteger","description":"Number of items returned"},"endTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of last result, in milliseconds"},"startTime":{"$ref":"#/components/schemas/UnsignedInteger","description":"Timestamp of first result, in milliseconds"}},"additionalProperties":true},"RequestError":{"title":"RequestError","$id":"#RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","$id":"#RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND","NO_ACCOUNTS_FOUND","NO_PRICES_FOUND_FOR_SYMBOL","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR"],"description":"Standardized error codes for API responses"},"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## GET /wallet/{address}/positions

> Get wallet positions

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/wallet/{address}/positions":{"get":{"summary":"Get wallet positions","operationId":"getWalletPositions","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"List of positions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Position"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","$id":"#Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"Position":{"title":"Position","$id":"#Position","type":"object","required":["exchangeId","symbol","accountId","qty","side","avgEntryPrice","avgEntryFundingValue","lastTradeSequenceNumber"],"properties":{"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"symbol":{"$ref":"#/components/schemas/Symbol"},"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"qty":{"$ref":"#/components/schemas/UnsignedDecimal"},"side":{"$ref":"#/components/schemas/Side"},"avgEntryPrice":{"$ref":"#/components/schemas/SignedDecimal"},"avgEntryFundingValue":{"$ref":"#/components/schemas/SignedDecimal","description":"Average of funding values at the entry times of currently open exposure, which serves as a baseline from which to compute the accrued funding in the position: units x (fundingValue - avgEntryFundingValue)"},"lastTradeSequenceNumber":{"$ref":"#/components/schemas/UnsignedInteger","description":"Sequence number of last execution taken into account for the position."}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","$id":"#UnsignedInteger","type":"integer","minimum":0},"Symbol":{"title":"Symbol","$id":"#Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedDecimal":{"title":"UnsignedDecimal","$id":"#UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Side":{"title":"Side","$id":"#Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"SignedDecimal":{"title":"SignedDecimal","$id":"#Decimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"RequestError":{"title":"RequestError","$id":"#RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","$id":"#RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND","NO_ACCOUNTS_FOUND","NO_PRICES_FOUND_FOR_SYMBOL","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR"],"description":"Standardized error codes for API responses"},"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet account balances

> Returns all account real balances for a wallet.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/wallet/{address}/accountBalances":{"get":{"summary":"Get wallet account balances","description":"Returns all account real balances for a wallet.","operationId":"getWalletAccountBalances","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"List of account balances","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountBalance"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","$id":"#Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"AccountBalance":{"title":"AccountBalance","$id":"#AccountBalance","type":"object","required":["accountId","asset","realBalance","balanceDEPRECATED"],"properties":{"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"asset":{"$ref":"#/components/schemas/Asset"},"realBalance":{"$ref":"#/components/schemas/SignedDecimal","description":"Sum of account net deposits (transfers, deposits and withdrawals) and realized pnl from closed positions. Realized pnl only applies to RUSD given it is the only settlement asset"},"balanceDEPRECATED":{"$ref":"#/components/schemas/SignedDecimal","description":"Sum of account net deposits (transfers, deposits and withdrawals). This field is deprecated and will be removed in a future release"}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","$id":"#UnsignedInteger","type":"integer","minimum":0},"Asset":{"title":"Asset","$id":"#Asset","type":"string","pattern":"^[A-Za-z0-9]+$"},"SignedDecimal":{"title":"SignedDecimal","$id":"#Decimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"RequestError":{"title":"RequestError","$id":"#RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","$id":"#RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND","NO_ACCOUNTS_FOUND","NO_PRICES_FOUND_FOR_SYMBOL","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR"],"description":"Standardized error codes for API responses"},"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet open orders

> Returns all pending orders for a wallet.

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/wallet/{address}/openOrders":{"get":{"summary":"Get wallet open orders","description":"Returns all pending orders for a wallet.","operationId":"getWalletOpenOrders","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"List of open orders","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","$id":"#Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"Order":{"title":"Order","$id":"#Order","type":"object","required":["exchangeId","symbol","accountId","orderId","side","limitPx","orderType","status","createdAt","lastUpdateAt"],"properties":{"exchangeId":{"$ref":"#/components/schemas/UnsignedInteger"},"symbol":{"$ref":"#/components/schemas/Symbol"},"accountId":{"$ref":"#/components/schemas/UnsignedInteger"},"orderId":{"type":"string"},"qty":{"$ref":"#/components/schemas/UnsignedDecimal"},"execQty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Executed quantity in the current order update."},"cumQty":{"$ref":"#/components/schemas/UnsignedDecimal","description":"Total Executed quantity accross all fills where the order is involved."},"side":{"$ref":"#/components/schemas/Side"},"limitPx":{"$ref":"#/components/schemas/SignedDecimal"},"orderType":{"$ref":"#/components/schemas/OrderType"},"triggerPx":{"$ref":"#/components/schemas/SignedDecimal","description":"Price at which TP/SL orders will be triggered, should not be set for other order types."},"timeInForce":{"$ref":"#/components/schemas/TimeInForce","description":"Order time in force, exclusively used for LIMIT orders"},"reduceOnly":{"type":"boolean","description":"Whether this is a reduce-only order, exclusively used for LIMIT IOC orders."},"status":{"$ref":"#/components/schemas/OrderStatus"},"createdAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Creation timestamp (milliseconds)"},"lastUpdateAt":{"$ref":"#/components/schemas/UnsignedInteger","description":"Last update timestamp (milliseconds)"}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","$id":"#UnsignedInteger","type":"integer","minimum":0},"Symbol":{"title":"Symbol","$id":"#Symbol","type":"string","pattern":"^[A-Za-z0-9]+$","description":"Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)"},"UnsignedDecimal":{"title":"UnsignedDecimal","$id":"#UnsignedDecimal","type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"Side":{"title":"Side","$id":"#Side","type":"string","enum":["B","A"],"description":"Order side (B = Buy/Bid, A = Ask/Sell)"},"SignedDecimal":{"title":"SignedDecimal","$id":"#Decimal","type":"string","pattern":"^-?\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},"OrderType":{"title":"OrderType","$id":"#OrderType","type":"string","enum":["LIMIT","TP","SL"],"description":"Order type, (LIMIT = Limit, TP = Take Profit, SL = Stop Loss)"},"TimeInForce":{"title":"TimeInForce","$id":"#TimeInForce","type":"string","enum":["IOC","GTC"],"description":"Order time in force (IOC = Immediate or Cancel, GTC = Good Till Cancel)"},"OrderStatus":{"title":"OrderStatus","$id":"#OrderStatus","type":"string","enum":["OPEN","FILLED","CANCELLED","REJECTED"],"description":"Order status"},"RequestError":{"title":"RequestError","$id":"#RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","$id":"#RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND","NO_ACCOUNTS_FOUND","NO_PRICES_FOUND_FOR_SYMBOL","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR"],"description":"Standardized error codes for API responses"},"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```

## Get wallet configuration

> Returns trading configuration for a wallet

```json
{"openapi":"3.0.3","info":{"title":"Reya DEX Trading API v2","version":"2.1.11"},"tags":[{"name":"Wallet Data","description":"Accounts, positions, trades, etc."}],"servers":[{"url":"https://api.reya.xyz/v2","description":"Production server"},{"url":"https://api-test.reya.xyz/v2","description":"Testnet server"}],"paths":{"/wallet/{address}/configuration":{"get":{"summary":"Get wallet configuration","description":"Returns trading configuration for a wallet","operationId":"getWalletConfiguration","tags":["Wallet Data"],"parameters":[{"$ref":"#/components/parameters/AddressParam"}],"responses":{"200":{"description":"Wallet configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletConfiguration"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"parameters":{"AddressParam":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}}},"schemas":{"Address":{"title":"Address","$id":"#Address","type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"WalletConfiguration":{"title":"WalletConfiguration","$id":"#WalletConfiguration","type":"object","required":["feeTierId","ogStatus","affiliateStatus","refereeStatus"],"properties":{"feeTierId":{"$ref":"#/components/schemas/UnsignedInteger","description":"Fee tier identifier"},"ogStatus":{"type":"boolean","description":"OG status"},"affiliateStatus":{"type":"boolean","description":"Affiliate status"},"refereeStatus":{"type":"boolean","description":"Referee status"}},"additionalProperties":true},"UnsignedInteger":{"title":"UnsignedInteger","$id":"#UnsignedInteger","type":"integer","minimum":0},"RequestError":{"title":"RequestError","$id":"#RequestError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/RequestErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"RequestErrorCode":{"title":"RequestErrorCode","$id":"#RequestErrorCode","type":"string","enum":["SYMBOL_NOT_FOUND","NO_ACCOUNTS_FOUND","NO_PRICES_FOUND_FOR_SYMBOL","INPUT_VALIDATION_ERROR","CREATE_ORDER_OTHER_ERROR","CANCEL_ORDER_OTHER_ERROR","ORDER_DEADLINE_PASSED_ERROR","ORDER_DEADLINE_TOO_HIGH_ERROR","INVALID_NONCE_ERROR","UNAVAILABLE_MATCHING_ENGINE_ERROR","UNAUTHORIZED_SIGNATURE_ERROR","NUMERIC_OVERFLOW_ERROR"],"description":"Standardized error codes for API responses"},"ServerError":{"title":"ServerError","$id":"#ServerError","type":"object","required":["error","message"],"properties":{"error":{"$ref":"#/components/schemas/ServerErrorCode"},"message":{"type":"string","description":"Human-readable error message"}},"additionalProperties":true},"ServerErrorCode":{"title":"ServerErrorCode","$id":"#ServerErrorCode","type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"Standardized error codes for API responses"}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestError"}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.reya.xyz/developers/readme/wallet-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
