get https://dapi.api.sui-prod.bluefin.io/orders
Allows user to get their orders on exchange
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.