Bluefin employs an off-chain orderbook and on-chain settlement. As such, orders are submitted via a POST /order endpoint to Bluefin's API as opposed to directly on-chain. These orders will be routed through the order matching engine and submitted on-chain once the order is matched.

Given orders are submitted on-chain by the matching engine, an order signature is critical to verify the authenticity of the user's order request on-chain. Once the order signature is created (by signing the order fields with your private key), the orderSignature field is passed in as a payload parameter to the POST /order endpoint.

Order cancellations work in a similar fashion, the DELETE /order API calls must include a signature of the order hashes being cancelled.

Bluefin's TypeScript and Python libraries provide methods to easily create signatures as detailed in the subsequent sections.


Order Signatures in Other Languages

To post an order to the API, you may choose any other language or library that allows you to make HTTP requests. While we don't support official libraries for other languages, you can find a list of order signature creation examples in various languages here.