Skip to content

Place an Order as a Builder

Both L2 (HMAC) credentials and the OPENFISH_BUILDER_ID header are required. The order enters the same matching engine as standard orders, and the builder attribution is recorded on every resulting trade.

POST /builder/order

Server: https://api.openfish.fun

Authentication: L2 (HMAC) + Builder ID header


HeaderRequiredDescription
OPENFISH_API_KEYYesAPI key (UUID)
OPENFISH_TIMESTAMPYesUnix timestamp
OPENFISH_PASSPHRASEYesAPI passphrase
OPENFISH_SIGNATUREYesHMAC-SHA256 signature
OPENFISH_BUILDER_IDYesBuilder identifier string

Content-Type: application/json

FieldTypeRequiredDescription
orderobjectYesOrder object (same schema as POST /order)
orderTypestringNo"GTC" (default), "GTD", or "FOK"

Order Object Fields:

FieldTypeRequiredDescription
tokenIdstringYesToken ID
makerstringNoMaker address (defaults to auth address)
sidestringYes"BUY" or "SELL"
makerAmountstringYesMaker amount (raw units)
takerAmountstringYesTaker amount (raw units)
signaturestringNoOrder signature
expirationstring/integerNoExpiration timestamp (for GTD)

{
"orderID": "0190b317-a1d3-7bec-9b91-eeb6dcd3a620",
"status": "LIVE",
"success": true,
"builder_id": "my-trading-bot",
"tradeIds": ["28c4d2eb-bbea-40e7-a9f0-b2fdb56b2c2e"]
}
{ "error": "OPENFISH_BUILDER_ID header required" }
{ "error": "invalid authorization" }