Realised P&L
GET
/api/trading/accounts/{account_id}/pnl
const url = 'https://example.com/api/trading/accounts/1/pnl';const options = { method: 'GET', headers: { 'INF-ACCESS-KEY': '<INF-ACCESS-KEY>', 'INF-ACCESS-TIMESTAMP': '<INF-ACCESS-TIMESTAMP>', 'INF-ACCESS-SIGNATURE': '<INF-ACCESS-SIGNATURE>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/trading/accounts/1/pnl \ --header 'INF-ACCESS-KEY: <INF-ACCESS-KEY>' \ --header 'INF-ACCESS-SIGNATURE: <INF-ACCESS-SIGNATURE>' \ --header 'INF-ACCESS-TIMESTAMP: <INF-ACCESS-TIMESTAMP>'All-time realised P&L, fees and net deposits. Given from_ms or to_ms, also what was realised and paid in fees in that range.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”account_id
required
Account Id
integer
Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Pnl
object
realized_pnl
required
Realized Pnl
integer
fees
required
Fees
Fees paid less rebates, in units. realized_pnl leaves them out.
integer
deposited
required
Deposited
integer
Examplegenerated
{ "realized_pnl": 1, "fees": 1, "deposited": 1, "range": { "from_ms": 1, "to_ms": 1, "realized_pnl": 1, "fees": 1 }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}