These docs are for v2.0.1. Click to read the latest docs for v3.0.2.

/orders

Allows user to get their orders on exchange

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

If you haven't already, we highly recommend checking out Order Statuses & Best Practices.

Client Library

import { BluefinClient, Networks, ORDER_STATUS } from "@bluefin-exchange/bluefin-v2-client";

async function main() {
  const dummyAccountKey =
    "trigger swim reunion gate hen black real deer light nature trial dust";
  const client = new BluefinClient(
    true,
    Networks.TESTNET_SUI,
    dummyAccountKey,
    "ED25519"
  );
  await client.init();

  // fetch open orders of all markets
  const resp= await client.getUserOrders({
  statuses: [ORDER_STATUS.OPEN, ORDER_STATUS.PARTIAL_FILLED]
}

main().then().catch(console.error);
from config import TEST_ACCT_KEY, TEST_NETWORK
import asyncio
from pprint import pprint
from bluefin_v2_client import (
    BluefinClient,
    Networks,
    MARKET_SYMBOLS,
)


async def main():
    client = BluefinClient(True, Networks[TEST_NETWORK], TEST_ACCT_KEY)
    await client.init(True)

    # Get all ETH market orders regardless of their type/status
    orders = await client.get_orders(
        {
            "symbol": MARKET_SYMBOLS.ETH,
        },
    )
    pprint(orders)


if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    loop.run_until_complete(main())
    loop.close()

HTTPs

Alternatively, if your auth token, call the GET /orders endpoint using the integrated editor on the right or locally from any language supporting HTTPs network calls.

Request & Response

Query Params
string

Market symbol for which the user wishes to get orders.
If not provided, API will return orders of all markets

string

Public address of parent account, if the user is a sub-account and wishes to fetch parent address orders

double

The unique id of the order when it is created

orderHashes
array of strings

Unique hashes of orders for which user wishes to get details of
an order that matches the given id qty etc. If the provided API will return orders that match the given hashes

orderHashes
orderType
array of objects

Type of orders the user wants to fetch. By default, it retrieve orders of both order types

orderType
Allowed:
statuses
array of objects

Status of orders user wants to fetch

statuses
double

Number of records required per page. The exchange server allows a maximum of 75 orders per page
and is the default page size.

double

Fetch order from a particular page number. Per page, there are 75 orders, so if a user has 100 filled orders,
he must call the method twice with page numbers 1 and 2 to get all 100 orders

Responses

400
Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json