Stream account
GET
/api/trading/accounts/{account_id}/stream
const url = 'https://example.com/api/trading/accounts/1/stream';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/stream \ --header 'INF-ACCESS-KEY: <INF-ACCESS-KEY>' \ --header 'INF-ACCESS-SIGNATURE: <INF-ACCESS-SIGNATURE>' \ --header 'INF-ACCESS-TIMESTAMP: <INF-ACCESS-TIMESTAMP>'account: {cash, free, held_for_withdrawals, admissible, positions: [{market_id, position}]} on every change. positions: {positions, settlements} as the two routes above return them. expired: the session ran out; log in and reconnect.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”account_id
required
Account Id
integer
Responses
Section titled “Responses”Server-sent events.
Media typetext/event-stream
string
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": {} } ]}