Skip to main content
GET
/
wallet
/
audit-items
Get Wallet Audit Items
curl --request GET \
  --url https://pm-t1.bxingupdate.com/bvapi/wallet/audit-items \
  --header 'Authorization: Bearer <token>'
{
  "total": 12,
  "items": [
    {
      "audit_name": "pUSD → CTF Exchange (V2)",
      "audit_item_code": "PUCE",
      "token_contract": "<string>",
      "spender_contract": "<string>",
      "method": "approve",
      "check_method": "allowance"
    }
  ]
}

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.

Retrieve the 12 on-chain approval items that a Deposit Wallet (signatureType=3) must complete before trading on Polymarket.

Overview

Polymarket V2 uses multiple exchange and adapter contracts on Polygon. A Deposit Wallet must grant token approvals to each of these contracts before orders can be executed. This endpoint returns the complete list of 12 required approvals, giving the agent all the information needed to execute them on-chain. Each approval is either:
  • ERC-20 approve — grant unlimited pUSD spending to a Polymarket contract
  • ERC-1155 setApprovalForAll — grant CTF (Conditional Token Framework) operator access to a Polymarket contract

Token Contracts

TokenAddressType
pUSD0xC011a7E12a19f7B1f670d46F03B03f3342E82DFBERC-20
CTF0x4D97DCd97eC945f40cF65F87097ACe5EA0476045ERC-1155

Spender Contracts

ContractAddress
CTF Exchange (V2)0xE111180000d2663C0091e4f400237545B87B996B
Neg Risk Exchange A (V2)0xe2222d279d744050d28e00520010520000310F59
Neg Risk Adapter0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296
Neg Risk Exchange B (V2)0xe2222d002000Ba0053CEF3375333610F64600036
PolyNode Fee Escrow0x3A43D88ef8Aae4dF5a50B3abf67122CAAeEF7c9F
CTF Collateral Adapter0xAdA100Db00Ca00073811820692005400218FcE1f
Neg Risk CTF Collateral Adapter0xadA2005600Dec949baf300f4C6120000bDB6eAab

Response

total
integer
Number of audit items (always 12).
items
array
Array of audit item objects.
Each item contains:
FieldTypeDescription
audit_namestringHuman-readable label, e.g. "pUSD → CTF Exchange (V2)"
audit_item_codestringShort code identifier, e.g. "PUCE"
token_contractstringERC-20 or ERC-1155 token contract address
spender_contractstringThe operator / spender to approve
methodstring"approve" (ERC-20) or "setApprovalForAll" (ERC-1155)
check_methodstring"allowance" or "isApprovedForAll" — how to verify on-chain
{
  "total": 12,
  "items": [
    {
      "audit_name": "pUSD → CTF Exchange (V2)",
      "audit_item_code": "PUCE",
      "token_contract": "0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB",
      "spender_contract": "0xE111180000d2663C0091e4f400237545B87B996B",
      "method": "approve",
      "check_method": "allowance"
    }
  ]
}

Examples

curl "https://pm-t1.bxingupdate.com/bvapi/wallet/audit-items" \
  -H "Authorization: Bearer YOUR_API_KEY"

How to Execute Approvals

After retrieving the 12 items, the agent should execute each approval on Polygon using the user’s private key:
from web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://polygon-rpc.com"))
account = w3.eth.account.from_key(private_key)

ERC20_ABI = [{"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
ERC1155_ABI = [{"inputs":[{"name":"operator","type":"address"},{"name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]
MAX_UINT256 = 2**256 - 1

for item in audit_items["items"]:
    token = w3.to_checksum_address(item["token_contract"])
    spender = w3.to_checksum_address(item["spender_contract"])

    if item["method"] == "approve":
        contract = w3.eth.contract(address=token, abi=ERC20_ABI)
        tx = contract.functions.approve(spender, MAX_UINT256).build_transaction({
            "from": account.address,
            "nonce": w3.eth.get_transaction_count(account.address),
            "gas": 100_000,
            "gasPrice": w3.eth.gas_price,
        })
    else:
        contract = w3.eth.contract(address=token, abi=ERC1155_ABI)
        tx = contract.functions.setApprovalForAll(spender, True).build_transaction({
            "from": account.address,
            "nonce": w3.eth.get_transaction_count(account.address),
            "gas": 100_000,
            "gasPrice": w3.eth.gas_price,
        })

    signed = account.sign_transaction(tx)
    tx_hash = w3.eth.send_raw_transaction(signed.raw_transaction)
    w3.eth.wait_for_transaction_receipt(tx_hash)
    print(f"✓ {item['audit_name']} approved")

Notes

  • This endpoint returns static configuration — the 12 items do not change per wallet.
  • The agent only needs to call this once to get the list, then execute approvals on-chain.
  • After all 12 are approved, the platform cron (every 30 min) updates auditsStatus to 1.
  • Each approval is a separate on-chain transaction and costs Polygon gas (MATIC/POL).

Authorizations

Authorization
string
header
default:YOUR_API_KEY
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

List of 12 audit items

total
integer

Number of audit items (always 12)

Example:

12

items
object[]