accepted = client.accept_quote( rfq_id=new_rfq["rfq_id"], parent_quote_id=parent_quote_id, side=TradeSide.SELL, # or BUY if you want to target a quote with the best ask).resultprint(json.dumps(accepted, indent=2))
Because pending_settlement_pool is not null and new_clearing_status is pending_pool_creation in the above response, the maker chose to create a new settlement pool for this trade. Note that the pool already exists and has an ID but is in pending state.
The pool and the quote will progress automatically, but it will take a few seconds. Use the helper to wait until then:
Note that if is poller returns successfully but quote['clearing_status'] is not pending_taker_deposit_approval, it means that the deposit for this trade is covered by a previously issued approval or there is enough funds in the pool, so no further action is required from you.
Approve USDC Spending for the Deposit
If the current clearing status is pending_taker_deposit_approval, you need to sign and submit a ERC-2612 spending approval for the deposit:
pool = client.get_settlement_pools(id=quote['pool_location']).result[0]permits.sign_and_submit_decimal( pool_address=pool['data']['pool_address'], allowance=accepted['pending_deposits_sum_qty'])
Wait for Clearing Status to Progress
Use the helper to wait until your deposit is approved:
The maker of the trade (the company that responded to your quote) is responsible for the remaining steps.
You can continue polling the quote until it reaches one of the final clearing statuses: success_trades_booked_into_pool, or one starting with rejected_.