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.create_fok_swap_trigger","wallet":"0x1111111111111111111111111111111111111111","payload":{"header":{"accountId":"123","market":"0x0A082280e4eA3D822E23Ec1186685477241A039d","authNonce":"1","nonce":"1792480000001","deadline":"1792500000","clientOrderId":"0x0000000000000000000000000000000000000000000000000000000000000001","builder":"0x0000000000000000000000000000000000000000","builderFeePps":"0"},"triggerExpiry":"1792503600","conditionSchema":"1","condition":"0x00000001...","conditionHash":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","order":{"side":"BUY","quantity":"10000000000","limitPrice":"30000000"},"signature":"0x..."}}'
{"requestId":"018f5ef2-88a1-7b41-a826-4b679010f87f","status":"BROADCAST","txHash":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","sponsorAddress":"0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","sponsorNonce":"42","transactionType":"DYNAMIC_FEE"}
Opt-in operational REST methods
Store FOK swap trigger
Submit wallet.create_fok_swap_trigger through the opt-in Relay operational path.
POST
/
relay
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.create_fok_swap_trigger","wallet":"0x1111111111111111111111111111111111111111","payload":{"header":{"accountId":"123","market":"0x0A082280e4eA3D822E23Ec1186685477241A039d","authNonce":"1","nonce":"1792480000001","deadline":"1792500000","clientOrderId":"0x0000000000000000000000000000000000000000000000000000000000000001","builder":"0x0000000000000000000000000000000000000000","builderFeePps":"0"},"triggerExpiry":"1792503600","conditionSchema":"1","condition":"0x00000001...","conditionHash":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","order":{"side":"BUY","quantity":"10000000000","limitPrice":"30000000"},"signature":"0x..."}}'
{"requestId":"018f5ef2-88a1-7b41-a826-4b679010f87f","status":"BROADCAST","txHash":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","sponsorAddress":"0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","sponsorNonce":"42","transactionType":"DYNAMIC_FEE"}
Submits
Storage only: this does not register a condition monitor, schedule execution, or perform the FOK swap. The condition starts with a four-byte big-endian schema prefix; Relay verifies its schema and hash, then discards the bytes. Persist the exact condition bytes yourself. Replace the illustrative condition and hash with a matching pair. Creation uses the wallet’s one-shot trigger/TWAP nonce namespace, not
wallet.create_fok_swap_trigger 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 for availability, gas, and latency rules.
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.string
required
New lowercase UUIDv7 for request correlation.
string
default:"wallet.create_fok_swap_trigger"
required
Must be
wallet.create_fok_swap_trigger.string
required
Trading wallet matching the bearer JWT; for AccountCore operations this is the sponsoring frontend identity, not necessarily the signed authorizer.
object
required
Method-specific payload shown below; unknown fields are rejected.
Automated triggers, including TP/SL, are not implemented as a live feature and remain work in progress. This method only stores an instruction where enabled; it does not monitor or execute a trigger.
lastSeenOrderNonce; WebSocket submissions still follow connection-level increasing nonce ordering.
Sign the exact EIP-712 type below using the KuruTradingWallet version 2, with the delegated trading wallet as verifyingContract and the selected chain ID (143 mainnet; 10143 testnet):
CreateFokSwapTriggerIntent(uint40 accountId,address market,uint256 authNonce,uint64 nonce,uint64 deadline,bytes32 clientOrderId,address builder,uint32 builderFeePps,uint64 triggerExpiry,bytes32 conditionHash,uint8 side,uint96 quantity,uint32 limitPrice)
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.create_fok_swap_trigger","wallet":"0x1111111111111111111111111111111111111111","payload":{"header":{"accountId":"123","market":"0x0A082280e4eA3D822E23Ec1186685477241A039d","authNonce":"1","nonce":"1792480000001","deadline":"1792500000","clientOrderId":"0x0000000000000000000000000000000000000000000000000000000000000001","builder":"0x0000000000000000000000000000000000000000","builderFeePps":"0"},"triggerExpiry":"1792503600","conditionSchema":"1","condition":"0x00000001...","conditionHash":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","order":{"side":"BUY","quantity":"10000000000","limitPrice":"30000000"},"signature":"0x..."}}'
{"requestId":"018f5ef2-88a1-7b41-a826-4b679010f87f","status":"BROADCAST","txHash":"0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","sponsorAddress":"0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","sponsorNonce":"42","transactionType":"DYNAMIC_FEE"}
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.