> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kuru.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Finalize expired TWAP

> Submit wallet.finalize_twap through the opt-in Relay operational path.

Submits `wallet.finalize_twap` when this method is enabled for the selected deployment. This is a **slow operational method**, not the low-latency trading path. Relay validates the typed request and signature where applicable, simulates the exact call against `latest`, and only then queues a sponsored transaction. See [Operational methods](/api/relay/operational) for availability, gas, and latency rules.

<Info>The example uses testnet WETH/USDC where a market is required, but all identities, nonces, timestamps, hashes, and signatures are illustrative. Read current state and build a fresh valid signature for the selected network. Omit `authorization7702` and `makerSlotsPrimed`; complete delegation first.</Info>

<ParamField body="requestId" type="string" required>New lowercase UUIDv7 for request correlation.</ParamField>
<ParamField body="method" type="string" required default="wallet.finalize_twap">Must be `wallet.finalize_twap`.</ParamField>
<ParamField body="wallet" type="string" required>Trading wallet matching the bearer JWT; for AccountCore operations this is the sponsoring frontend identity, not necessarily the signed authorizer.</ParamField>
<ParamField body="payload" type="object" required>Method-specific payload shown below; unknown fields are rejected.</ParamField>

The contract operation is permissionless, but Relay targets only the JWT-bound trading wallet. Supply only `twapId`; there is no client signature, nonce, deadline, account, market, or arbitrary target in this payload. An ACTIVE TWAP must have passed its end time. Finalization records skipped slices and FINISHED state; it does not execute slices, cancel orders, or move funds.

No EIP-712 signature is required for this permissionless contract finalization. The bearer JWT still identifies the Relay client.

<RequestExample>
  ```curl cURL theme={null}
  curl --request POST --url https://relay.testnet.kuru.io/relay \
    --header "Authorization: Bearer $KURU_RELAY_JWT" \
    --header 'Content-Type: application/json' \
    --data '{"requestId":"018f5ef2-88a1-7b41-a826-4b679010f87f","method":"wallet.finalize_twap","wallet":"0x1111111111111111111111111111111111111111","payload":{"twapId":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}'
  ```
</RequestExample>

<ResponseExample>
  ```json BROADCAST theme={null}
  {"requestId":"018f5ef2-88a1-7b41-a826-4b679010f87f","status":"BROADCAST","txHash":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","sponsorAddress":"0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","sponsorNonce":"42","transactionType":"DYNAMIC_FEE"}
  ```
</ResponseExample>

`BROADCAST` means scheduling for asynchronous RPC broadcast, not provider acceptance or successful execution. Check the receipt and expected events/state. A failed estimate returns an immediate error with no transaction signed or broadcast.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.