My App

Get realized PnL

Get trader realized PnL.

Requires authentication.

GET
/portfolios/realized-pnl
OBSIDIAN-KEY<token>

In: header

OBSIDIAN-SECRET<token>

In: header

Query Parameters

limit?string

Number of items per page; if not set, default to 20.

Formatint64
page?string

Page number; if not set, default to 1.

Formatint64
product?string

Product id; if not set, default to all products.

from?string

(optional) Start timestamp in nanoseconds. If not set,

Formatint64
to?string

default to since the beginning.

(optional) End timestamp in nanoseconds. If not set, default

Formatint64

Response Body

application/json

application/json

curl -X GET "https://api.dev.obsidian.exchange/portfolios/realized-pnl"
{
  "address": "string",
  "data": [
    {
      "timestamp": "string",
      "product_id": "string",
      "side": "BUY",
      "entry_price": "string",
      "exit_price": "string",
      "size": "string",
      "pnl": "string",
      "funding": "string"
    }
  ],
  "paging": {
    "page": "string",
    "per_page": "string",
    "last_page": "string",
    "total": "string",
    "from": "string",
    "to": "string"
  }
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}