Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-t.aionmarket.com/llms.txt

Use this file to discover all available pages before exploring further.

Return the metadata an EOA wallet (signatureType=0) needs in order to authorize platform fee collection on Polygon.

Overview

Before the platform can charge a Polymarket trading fee from an EOA wallet, the EOA must call:
pUSD.approve(<spender>, allowance)
on Polygon. This endpoint returns the correct <spender> address (the platform Fireblocks Vault) plus the matching token / fee-receiver / chain metadata so callers do not have to hard-code anything. The returned spender is the Fireblocks Vault Polygon address, not the platform fee receiver — the Vault acts as msg.sender for the eventual pUSD.transferFrom(eoa, platformFeeAddress, amount) call.
Use this endpoint together with POST /aiagent/charge-fee/polymarket/eoa-trade-fee. When using the Python SDK, client.trade(..., eoa_private_key=PK) calls this endpoint internally and runs the approve for you idempotently.

Request

No body, no query params. Authenticated with the standard Authorization: Bearer <API_KEY> header.

Response

FieldTypeDescription
spenderstringPlatform Fireblocks Vault Polygon address. Use this as the spender argument to pUSD.approve(...).
platformFeeAddressstringFinal fee-receiving address (0xeA44cAF1f893729342dC5D8903F658E8D3e2379B). Informational; do not approve this address.
tokenAddressstringpUSD ERC-20 contract address on Polygon.
decimalsnumberToken decimals (always 6 for pUSD).
chainIdnumberEVM chain ID (always 137 for Polygon mainnet).
{
  "spender": "0x1234...AbCd",
  "platformFeeAddress": "0xeA44cAF1f893729342dC5D8903F658E8D3e2379B",
  "tokenAddress": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB",
  "decimals": 6,
  "chainId": 137
}

Examples

curl -X GET "https://pm-t1.bxingupdate.com/bvapi/aiagent/charge-fee/polymarket/spender" \
  -H "Authorization: Bearer YOUR_API_KEY"

Error Responses

StatusDescription
400无法解析 Fireblocks Vault (...) 的 Polygon 地址 — operator-side Fireblocks misconfiguration
500Fireblocks SDK call failed

Notes

  • The spender may rotate if the platform changes its Fireblocks Vault. Always call this endpoint at agent startup (or before re-approving) instead of caching the address forever.
  • Approving with MAX_UINT256 (the SDK default) is recommended — a single approve covers all future trades at the 1% fee rate.