build_commit_tx · Build: commit a sealed order
read-onlyBuilds the UNSIGNED transactions to commit a hidden order to the batch taking orders now: an exact approve for the $ENDGAME order burn if needed, then commit(market, batch, hash). Returns the hash and a ticket (every field needed to reveal; keep it private until the reveal window), the reveal window, what the reveal will lock, and fundingTxs if the Endgame balance is short. Pass your own 32-byte salt for best privacy, or the server generates one and does not store it. Amounts are in whole tokens; limit is in USDG per token (a buy pays at most it, a sell takes at least it). Free.
Input schema
{
"type": "object",
"properties": {
"market": {
"type": "string"
},
"side": {
"type": "string",
"enum": [
"buy",
"sell"
]
},
"amount": {
"type": "string",
"description": "Size in the stock token, e.g. \"0.5\""
},
"limit": {
"type": "string",
"description": "Limit price in USDG per token, e.g. \"390\""
},
"from": {
"type": "string",
"description": "Trader address (sends the commit and owns the order)"
},
"salt": {
"type": "string",
"description": "Optional 0x + 64 hex"
}
},
"required": [
"market",
"side",
"amount",
"limit",
"from"
]
}