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

/userTradesHistory

Retrieves user completed trades.

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

Client Library

import { BluefinClient, Networks, MARKET_SYMBOLS } 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 only BTC-PERP trades history of user
  const resp = await client.getUserTradesHistory({
      symbol: MARKET_SYMBOLS.BTC,
      parentAddress: "0xFEa83f912CF21d884CDfb66640CfAB6029D940aF",
    });
  console.log(resp.data);
}

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


async def main():
    client = BluefinClient(
        True,  # agree to terms and conditions
        Networks[TEST_NETWORK],  # network to connect with
        TEST_ACCT_KEY,  # seed phrase of the wallet
    )

    # initialize the client
    # on boards user on Bluefin. Must be set to true for first time use
    await client.init(True)

    # trade history 
    history = await client.getUserTradesHistory()
    pprint(history)

    await client.close_connections()


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

HTTPs

Alternatively, if you have obtained your auth token, call the GET /userTradesHistory 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 its trades

boolean

if TRUE, then will fetch trades having the user as the maker

string
enum

Order type could be Market or Limit

Allowed:
string

Provide if trading as a subaccount

double

Each trade is given an incremental id; provide the id to get trades after the provided id

double

The time after which trades will be fetched from

double

The time before which all trades will be returned

double

Provide a total number of records to get. Max allowed value is 50

double

The particular page number to be fetched

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