Skip to content

Post a New Order

Submits a signed order to the matching engine for processing. Depending on available liquidity, the order may rest on the book as a limit, fill immediately, or be rejected outright.

POST /order

Base URL: https://api.openfish.fun

L2 authentication required. All five OPENFISH_* headers must be present.

FieldTypeRequiredDescription
orderobjectYesThe signed order object (see below)
ownerstringNoUUID of the API key owner
orderTypestringNoTime in force: GTC, FOK, GTD, FAK. Default: GTC
postOnlybooleanNoIf true, order is rejected if it would immediately match. Default: false
deferExecbooleanNoIf true, order is inserted into the book but not submitted to the matching engine. Status is set to DEFERRED. Default: false
FieldTypeRequiredDescription
tokenIdstringYesToken ID (asset ID) for the order
makerstringYesEthereum address of the maker (proxy address)
signerstringYesEthereum address of the signer
takerstringYesTaker address (0x0 for open orders)
sidestringYesBUY or SELL
makerAmountstringYesAmount maker provides (6-decimal fixed-point)
takerAmountstringYesAmount taker provides (6-decimal fixed-point)
expirationstringYesUNIX timestamp when the order expires
noncestringYesOrder nonce
feeRateBpsstringYesFee rate in basis points
signaturestringYesCryptographic signature of the order
saltintegerYesRandom salt for order uniqueness
signatureTypeintegerYes0 (EOA), 1 (OPENFISH_PROXY), 2 (GNOSIS_SAFE)
{
"order": {
"tokenId": "0xabc123...",
"maker": "0x1234567890123456789012345678901234567890",
"signer": "0x1234567890123456789012345678901234567890",
"taker": "0x0000000000000000000000000000000000000000",
"side": "BUY",
"makerAmount": "100000000",
"takerAmount": "200000000",
"expiration": "1735689600",
"nonce": "0",
"feeRateBps": "10",
"signature": "0x1234abcd...",
"salt": 1234567890,
"signatureType": 2
},
"orderType": "GTC",
"postOnly": false
}
{
"success": true,
"orderID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "LIVE",
"makingAmount": "100000000",
"takingAmount": "200000000",
"transactionsHashes": [],
"tradeIds": [],
"errorMsg": ""
}
FieldTypeDescription
successbooleanIndicates whether the engine accepted the order
orderIDstringUUID assigned to the order
statusstringLIVE, MATCHED, or CANCELED
makingAmountstringMaker amount in 6-decimal fixed-point
takingAmountstringTaker amount in 6-decimal fixed-point
transactionsHashesarrayOn-chain transaction hashes (populated when matched)
tradeIdsarrayTrade identifiers (populated when matched)
errorMsgstringDiagnostic message (empty when successful)
Terminal window
curl -X POST https://api.openfish.fun/order \
-H "Content-Type: application/json" \
-H "OPENFISH_ADDRESS: 0x..." \
-H "OPENFISH_SIGNATURE: ..." \
-H "OPENFISH_TIMESTAMP: 1700000000" \
-H "OPENFISH_API_KEY: ..." \
-H "OPENFISH_PASSPHRASE: ..." \
-d '{"order":{...},"orderType":"GTC"}'