GET /priapi/v1/dx/market/v2/pnl/wallet-profile/chain-pnl
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/web3okx/priapi/v1/dx/market/v2/pnl/wallet-profile/chain-pnlCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeOKX DEX PnL per indexed chain for an address
totalPnl tracks OKX DEX swap activity only. Addresses with no OKX DEX trades show totalPnl:'0' on all chains regardless of holdings. The client appends a cache-busting millisecond timestamp (t) automatically.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
periodType | query | int | required | Time window; 1 was the only observed value — other values such as 3, 7, or 30 are unverified. example: 1 |
walletAddress | query | str | required | example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 |
Response
type: object
data key: profilePnlChains
pagination: none
sample: {
"profilePnlChains": "array[6] object{chainId:str,chainLogoUrl:str,chainName:str,nativeTokenSymbol:str,totalPnl:str,walletAddress:str}"
}
Safe request
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/web3okx/priapi/v1/dx/market/v2/pnl/wallet-profile/chain-pnl?periodType=1&walletAddress=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"