'''
{
"openapi": "3.0.0",
"info": {
"title": "Client Portal Web API",
"description": "Production version of the Client Portal Web API",
"version": "1.0.0"
},
"paths": {
"/iserver/account/trades": {
"get": {
"summary": "List of Trades for the selected account",
"description": "Returns a list of trades for the currently selected account for current day and six previous days.",
"tags": [
"Trades"
],
"responses": {
"200": {
"description": "An array of trades",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/trade"
}
}
}
}
}
}
}
},
"/iserver/accounts": {
"get": {
"summary": "Brokerage Accounts",
"description": "Returns a list of accounts the user has trading access to, their respective aliases and the currently selected account. Note this endpoint must be called before modifying an order or querying open orders.",
"tags": [
"Account"
],
"responses": {
"200": {
"description": "An array of accounts",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"type": "string"
},
"description": "Unique account id"
},
"aliases": {
"type": "object",
"description": "Account Id and its alias"
},
"selectedAccount": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/iserver/account": {
"post": {
"summary": "Updates currently selected account to the provided account",
"description": "If an user has multiple accounts, and user wants to get orders, trades, etc. of an account other than currently selected account, then user can update the currently selected account using this API and then can fetch required information for the newly updated account.",
"tags": [
"Account"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/set-account"
}
}
},
"description": "account id",
"required": true
},
"responses": {
"200": {
"description": "an object containing updated account ID",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"set": {
"type": "boolean"
},
"acctId": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/iserver/account/orders": {
"get": {
"summary": "Live Orders",
"description": "The end-point is meant to be used in polling mode, e.g. requesting every x seconds.\nThe response will contain two objects, one is notification, the other is orders. \nOrders is the list of orders (cancelled, filled, submitted) with activity in the current day. \nNotifications contains information about execute orders as they happen, see status field.\n",
"tags": [
"Order"
],
"responses": {
"200": {
"description": "An object contains two arrays",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"orders": {
"type": "array",
"items": {
"$ref": "#/components/schemas/order"
}
},
"notifications": {
"type": "array",
"items": {
"type": "object",
"description": "contains notifications for different status of orders, the data structure is same to orders"
}
}
}
}
}
}
}
}
}
},
"/iserver/account/{accountId}/order": {
"post": {
"summary": "Place Order",
"description": "Please note here, sometimes this end-point alone can't make sure you submit the order successfully,\nyou could receive some questions in the response, you have to to answer them in order to submit the order\nsuccessfully. You can use "/iserver/reply/{replyid}" end-point to answer questions\n",
"tags": [
"Order"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/order-request"
}
}
},
"description": "order request info",
"required": true
},
"responses": {
"200": {
"description": "returns an array",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"message": {
"type": "array",
"description": "Please note here, if the message is a question, you have to reply to question in order to submit\nthe order successfully. See more in the "/iserver/reply/{replyid}" end-point.\n",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"/iserver/account/{accountId}/orders": {
"post": {
"summary": "Place Orders (Support bracket orders)",
"description": "You can pass a list of orders here\n",
"tags": [
"Order"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"orders": {
"type": "array",
"description": "Notes for bracket orders: 1. Children orders will not have its own "cOID", so please donot pass "cOID"\nparameter in child order.Instead, they will have a "parentId" which must be equal to "cOID" of parent.\n2. When you cancel a parent order, it will cancel all bracket orders, when you cancel one child order,\nit will also cancel its sibling order.\n",
"items": {
"$ref": "#/components/schemas/order-request"
}
}
}
}
}
},
"description": "order request info",
"required": true
},
"responses": {
"200": {
"description": "returns an array",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"message": {
"type": "array",
"description": "Please note here, if the message is a question, you have to reply to question in order to submit\nthe order successfully. See more in the "/iserver/reply/{replyid}" end-point.\n",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"/iserver/reply/{replyid}": {
"post": {
"summary": "Place Order Reply",
"description": "Reply to questions when placing orders and submit orders",
"tags": [
"Order"
],
"parameters": [
{
"name": "replyid",
"in": "path",
"required": true,
"description": "Please use the "id" from the response of "Place Order" end-point",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"confirmed": {
"description": "answer to question, true means yes, false means no",
"type": "boolean"
}
}
}
}
},
"description": "Answer to question",
"required": true
},
"responses": {
"200": {
"description": "Order is submitted successfully, returns an array contains one object",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"order_status": {
"type": "string"
},
"local_order_id": {
"type": "string"
}
}
}
}
}
}
},
"400": {
"description": "When you send "confirmed-false" in the request, you will receive this",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"description": "for example-order not confirmed",
"type": "string"
},
"statusCode": {
"type": "integer"
}
}
}
}
}
}
}
}
},
"/iserver/account/{accountId}/order/whatif": {
"post": {
"summary": "Preview Order",
"description": "This end-point allows you to preview order without actually submitting the order and you can get\ncommission information in the response.\n",
"tags": [
"Order"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/order-request"
}
}
},
"description": "order info",
"required": true
},
"responses": {
"200": {
"description": "returns an object",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"amount": {
"type": "object",
"properties": {
"amount": {
"type": "string",
"description": "for example 23,000 USD"
},
"commission": {
"type": "string",
"description": "for example 1.1 ... 1.2 USD"
},
"total": {
"type": "string"
}
}
},
"equity": {
"type": "object",
"properties": {
"current": {
"type": "string"
},
"change": {
"type": "string"
},
"after": {
"type": "string"
}
}
},
"initial": {
"type": "object",
"properties": {
"current": {
"type": "string"
},
"change": {
"type": "string"
},
"after": {
"type": "string"
}
}
},
"maintenance": {
"type": "object",
"properties": {
"current": {
"type": "string"
},
"change": {
"type": "string"
},
"after": {
"type": "string"
}
}
},
"warn": {
"type": "string"
},
"error": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/iserver/account/{accountId}/order/{origCustomerOrderId}": {
"post": {
"summary": "Modify Order",
"description": "Modifies an open order. The /iserver/accounts endpoint must first be called.",
"tags": [
"Order"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "origCustomerOrderId",
"description": "Customer OrderId",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/modify-order"
}
}
},
"description": "modify-order request",
"required": true
},
"responses": {
"200": {
"description": "returns an array",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"local_order_id": {
"type": "string"
},
"order_status": {
"type": "string"
}
}
}
}
}
}
}
}
},
"delete": {
"summary": "Delete Order",
"tags": [
"Order"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "origCustomerOrderId",
"description": "Customer OrderId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "returns an array",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"local_order_id": {
"type": "string"
},
"order_status": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"/iserver/marketdata/snapshot": {
"get": {
"summary": "Market Data",
"description": "Get Market Data for the given conid(s). The end-point will return by default bid, ask, last, change, change pct, close, listing exchange.\nSee response fields for a list of available fields that can be request via fields argument.\nThe endpoint /iserver/accounts should be called prior to /iserver/marketdata/snapshot.\nTo receive all available fields the /snapshot endpoint will need to be called several times.\n",
"tags": [
"Market_Data"
],
"parameters": [
{
"in": "query",
"name": "conids",
"description": "list of conids separated by comma",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "since",
"description": "time period since which updates are required. uses epoch time with milliseconds.",
"required": false,
"schema": {
"type": "integer"
}
},
{
"in": "query",
"name": "fields",
"description": "list of fields separated by comma",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns an array of objects",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"31": {
"type": "string",
"description": "Last Price"
},
"55": {
"type": "string",
"description": "Symbol"
},
"58": {
"type": "string",
"description": "Text"
},
"70": {
"type": "string",
"description": "High"
},
"71": {
"type": "string",
"description": "Low"
},
"72": {
"type": "string",
"description": "Position"
},
"73": {
"type": "string",
"description": "Market Value"
},
"74": {
"type": "string",
"description": "Average Price"
},
"75": {
"description": "Unrealized PnL",
"type": "string"
},
"76": {
"type": "string"
},
"77": {
"type": "string"
},
"78": {
"type": "string"
},
"82": {
"type": "string",
"description": "Change Price"
},
"83": {
"type": "string",
"description": "Change Percent"
},
"84": {
"type": "string",
"description": "Bid Price"
},
"85": {
"type": "string",
"description": "Ask Size"
},
"86": {
"type": "string",
"description": "Ask Price"
},
"87": {
"type": "string",
"description": "Volume"
},
"88": {
"type": "string",
"description": "Bid Size"
},
"6004": {
"type": "string",
"description": "Exchange"
},
"6008": {
"type": "string",
"description": "Conid"
},
"6070": {
"type": "string",
"description": "Security Type"
},
"6072": {
"type": "string",
"description": "Months"
},
"6073": {
"type": "string",
"description": "Regular Expiry"
},
"6119": {
"type": "string"
},
"6457": {
"type": "string",
"description": "Underlying Conid. Use /trsrv/secdef to get more information about the security"
},
"6509": {
"type": "string",
"description": "Market Data Availability. The field may contain two chars. The first char is the primary code: R = Realtime, D = Delayed,\nZ = Frozen, Y = Frozen Delayed. The second char is the secondary code: P = Snapshot Available, p = Consolidated.\n"
},
"7051": {
"type": "string"
},
"7094": {
"type": "string",
"description": "Conid + Exchange"
},
"7219": {
"type": "string",
"description": "Contract Description"
},
"7220": {
"type": "string",
"description": "Contract Description"
},
"7221": {
"type": "string",
"description": "Listing Exchange"
},
"7280": {
"type": "string",
"description": "Industry"
},
"7281": {
"type": "string",
"description": "Category"
},
"7282": {
"type": "string",
"description": "Average Daily Volume"
},
"7284": {
"type": "string",
"description": "Historic Volume (30d)"
},
"7285": {
"type": "string",
"description": "Put/Call Ratio"
},
"7286": {
"type": "string",
"description": "Dividend Amount"
},
"7287": {
"type": "string",
"description": "Dividend Yield %"
},
"7288": {
"type": "string",
"description": "Ex-date of the dividend"
},
"7289": {
"type": "string",
"description": "Market Cap"
},
"7290": {
"type": "string",
"description": "P/E"
},
"7291": {
"type": "string",
"description": "EPS"
},
"7292": {
"type": "string",
"description": "Cost Basis"
},
"7293": {
"type": "string",
"description": "52 Week High"
},
"7294": {
"type": "string",
"description": "52 Week Low"
},
"7295": {
"type": "string",
"description": "Open Price"
},
"7296": {
"type": "string",
"description": "Close Price"
},
"7633": {
"type": "string",
"description": "Implied volatility of the option"
},
"server_id": {
"type": "string"
},
"conid": {
"type": "integer"
},
"_updated": {
"type": "integer"
}
}
}
}
}
}
},
"400": {
"description": "sent when accounts are not queried before sending this request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"statusCode": {
"type": "integer"
}
}
}
}
}
}
}
}
},
"/iserver/marketdata/history": {
"get": {
"summary": "Market Data History",
"description": "Get history of market Data for the given conid, length of data is controlled by period and bar. e.g. 1y period with bar =1w returns 52 data points",
"tags": [
"Market_Data"
],
"parameters": [
{
"in": "query",
"name": "conid",
"description": "contract id",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "period",
"description": "time period-- 1d,1w,1m,1y",
"required": true,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "bar",
"description": "possible value-- 5min,1h,1w",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns an object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/history-data"
}
}
}
}
}
}
},
"/iserver/contract/{conid}/info": {
"get": {
"summary": "Contract Info",
"description": "get contract details, you can use this to prefill your order before you submit an order",
"tags": [
"Contract"
],
"parameters": [
{
"name": "conid",
"in": "path",
"required": true,
"description": "contract id",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "returns an object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/contract"
}
}
}
}
}
}
},
"/iserver/secdef/search": {
"post": {
"summary": "Search by symbol or name",
"tags": [
"Contract"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"symbol"
],
"properties": {
"symbol": {
"type": "string",
"description": "symbol or name to be searched"
},
"name": {
"type": "boolean",
"description": "should be true if the search is to be performed by name. false by default."
},
"secType": {
"type": "string",
"description": "If search is done by name, only the assets provided in this field will be returned. Currently, only STK is supported."
}
}
}
}
},
"description": "symbol or name to be searched",
"required": true
},
"responses": {
"200": {
"description": "returns an array of results",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"conid": {
"type": "integer"
},
"companyHeader": {
"type": "string"
},
"companyName": {
"type": "string"
},
"symbol": {
"type": "string"
},
"description": {
"type": "string"
},
"opt": {
"type": "string"
},
"war": {
"type": "string"
},
"sections": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
}
}
},
"500": {
"description": "error while processing the request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/iserver/scanner/params": {
"get": {
"summary": "get lists of available scanners",
"description": "Returns an object contains four lists contain all parameters for scanners",
"tags": [
"Scanner"
],
"responses": {
"200": {
"description": "An object contains lists",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"scan_type_list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"code": {
"type": "string"
},
"instruments": {
"type": "array",
"items": {
"type": "string",
"description": "type of instrument"
}
}
}
}
},
"instrument_list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"type": {
"type": "string"
},
"filters": {
"type": "array",
"items": {
"type": "string",
"description": "code of filter"
}
}
}
}
},
"filter_list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"group": {
"type": "string"
},
"display_name": {
"type": "string"
},
"code": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
},
"location_tree": {
"type": "array",
"items": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"type": {
"type": "string"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/iserver/scanner/run": {
"post": {
"summary": "run scanner to get a list of contracts",
"tags": [
"Scanner"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/scanner-params"
}
}
},
"description": "modify-order request",
"required": true
},
"responses": {
"200": {
"description": "returns an array",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"server_id": {
"type": "string"
},
"column_name": {
"type": "string"
},
"symbol": {
"type": "string"
},
"conidex": {
"type": "string"
},
"con_id": {
"type": "number"
},
"available_chart_periods": {
"type": "string"
},
"company_name": {
"type": "string"
},
"contract_description_1": {
"type": "string"
},
"listing_exchange": {
"type": "string"
},
"sec_type": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"/iserver/account/pnl/partitioned": {
"get": {
"summary": "PnL for the selected account",
"description": "Returns an object containing PnLfor the selected account and its models (if any).",
"tags": [
"PnL",
"Account"
],
"responses": {
"200": {
"description": "An object containing account and model(s) pnl",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"acctId": {
"type": "object"
}
}
}
}
}
}
}
}
},
"/sso/validate": {
"get": {
"summary": "Validate SSO",
"description": "Validates the current session for the SSO user",
"tags": [
"Session"
],
"responses": {
"200": {
"description": "An Object",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"LOGIN_TYPE": {
"description": "1 for Live, 2 for Paper",
"type": "number"
},
"USER_NAME": {
"description": "Username",
"type": "string"
},
"USER_ID": {
"description": "User ID",
"type": "number"
},
"expire": {
"description": "Time in milliseconds until session expires. Caller needs to call the again to re-validate session",
"type": "number"
},
"RESULT": {
"description": "true if session was validated; false if not.",
"type": "boolean"
},
"AUTH_TIME": {
"description": "Time of session validation",
"type": "number"
}
}
}
}
}
},
"401": {
"description": "Authentication failed"
},
"500": {
"description": "System failed"
}
}
}
},
"/portfolio/accounts": {
"get": {
"summary": "Portfolio Accounts",
"description": "In non-tiered account structures, returns a list of accounts for which the user can view position and account information. This endpoint must be called prior to calling other /portfolio endpoints for those accounts. For querying a list of accounts which the user can trade, see /iserver/accounts. For a list of subaccounts in tiered account structures (e.g. financial advisor or ibroker accounts) see /portfolio/subaccounts.",
"tags": [
"Account",
"Portfolio"
],
"responses": {
"200": {
"description": "An array",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/accounts"
}
}
}
}
}
}
},
"/portfolio/subaccounts": {
"get": {
"summary": "List of Sub-Accounts",
"description": "Used in tiered account structures (such as financial advisor and ibroker accounts) to return a list of sub-accounts for which the user can view position and account-related information. This endpoint must be called prior to calling other /portfolio endpoints for those subaccounts. To query a list of accounts the user can trade, see /iserver/accounts.",
"tags": [
"Account",
"Portfolio"
],
"responses": {
"200": {
"description": "An array",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/account"
}
}
}
}
}
}
},
"/portfolio/{accountId}/meta": {
"get": {
"summary": "Account Information",
"description": "Account information related to account Id /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint.",
"tags": [
"Account",
"Portfolio"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "An object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/accounts"
}
}
}
}
}
}
},
"/portfolio/{accountId}/allocation": {
"get": {
"summary": "Account Allocation",
"description": "Information about the account's portfolio allocation by Asset Class, Industry and Category. /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint.",
"tags": [
"Portfolio"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "returns an object of three different allocations",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/allocation"
}
}
}
}
}
}
},
"/portfolio/allocation": {
"post": {
"summary": "Account Alloction (All Accounts)",
"description": "Similar to /portfolio/{accountId}/allocation but returns a consolidated view of of all the accounts returned by /portfolio/accounts. /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint.",
"tags": [
"Portfolio"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"acctIds": {
"type": "array",
"items": {
"type": "string",
"description": "account id"
}
}
}
}
}
},
"description": "accounts info",
"required": true
},
"responses": {
"200": {
"description": "returns an object of three different allocations",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/allocation"
}
}
}
}
}
}
},
"/portfolio/{accountId}/positions/{pageId}": {
"get": {
"summary": "Portfolio Positions",
"description": "Returns a list of positions for the given account. The endpoint supports paging, page's default size is 30 positions. /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint.",
"tags": [
"Portfolio"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
},
{
"name": "pageId",
"in": "path",
"required": true,
"description": "page id",
"schema": {
"type": "string",
"default": "0"
}
},
{
"name": "model",
"in": "query",
"description": "optional",
"schema": {
"type": "string"
}
},
{
"name": "sort",
"in": "query",
"description": "declare the table to be sorted by which column",
"schema": {
"type": "string"
}
},
{
"name": "direction",
"in": "query",
"description": "in which order, a means ascending - d means descending",
"schema": {
"type": "string"
}
},
{
"name": "period",
"in": "query",
"description": "period for pnl column, can be 1D, 7D, 1M...",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "returns a list of positions in the portfolio",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/position"
}
}
}
}
}
}
},
"/portfolio/{accountId}/position/{conid}": {
"get": {
"summary": "Position by Conid",
"description": "Returns a list of all positions matching the conid. For portfolio models the conid could be in more than one model, returning an array with the name of the model it belongs to. /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint.",
"tags": [
"Portfolio"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
},
{
"name": "conid",
"in": "path",
"required": true,
"description": "contract id",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "returns a list containing only one position for the conid",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/position"
}
}
}
}
}
}
},
"/portfolio/{accountId}/positions/invalidate": {
"post": {
"summary": "Invalidates the backend cache of the Portfolio",
"tags": [
"Portfolio"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "200 means successful",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/portfolio/{accountId}/summary": {
"get": {
"summary": "Account Summary",
"description": "Returns information about margin, cash balances and other information related to specified account. See also /portfolio/{accountId}/ledger. /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint.",
"tags": [
"Account",
"Portfolio"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "returns an object containing account summary. The object contains multiple properties. A property is sufficed with -c if its provides commodity value, -s if it provides security value and -c if its UKL segment value",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"accountready": {
"$ref": "#/components/schemas/summary"
},
"accounttype": {
"$ref": "#/components/schemas/summary"
},
"accruedcash": {
"$ref": "#/components/schemas/summary"
},
"accruedcash-c": {
"$ref": "#/components/schemas/summary"
},
"accruedcash-f": {
"$ref": "#/components/schemas/summary"
},
"accruedcash-s": {
"$ref": "#/components/schemas/summary"
},
"accrueddividend": {
"$ref": "#/components/schemas/summary"
},
"accrueddividend-c": {
"$ref": "#/components/schemas/summary"
},
"accrueddividend-f": {
"$ref": "#/components/schemas/summary"
},
"accrueddividend-s": {
"$ref": "#/components/schemas/summary"
},
"availablefunds": {
"$ref": "#/components/schemas/summary"
},
"availablefunds-c": {
"$ref": "#/components/schemas/summary"
},
"availablefunds-f": {
"$ref": "#/components/schemas/summary"
},
"availablefunds-s": {
"$ref": "#/components/schemas/summary"
},
"billable": {
"$ref": "#/components/schemas/summary"
},
"billable-c": {
"$ref": "#/components/schemas/summary"
},
"billable-f": {
"$ref": "#/components/schemas/summary"
},
"billable-s": {
"$ref": "#/components/schemas/summary"
},
"buyingpower": {
"$ref": "#/components/schemas/summary"
},
"cushion": {
"$ref": "#/components/schemas/summary"
},
"daytradesremaining": {
"$ref": "#/components/schemas/summary"
},
"daytradesremainingt+1": {
"$ref": "#/components/schemas/summary"
},
"daytradesremainingt+2": {
"$ref": "#/components/schemas/summary"
},
"daytradesremainingt+3": {
"$ref": "#/components/schemas/summary"
},
"daytradesremainingt+4": {
"$ref": "#/components/schemas/summary"
},
"equitywithloanvalue": {
"$ref": "#/components/schemas/summary"
},
"equitywithloanvalue-c": {
"$ref": "#/components/schemas/summary"
},
"equitywithloanvalue-f": {
"$ref": "#/components/schemas/summary"
},
"equitywithloanvalue-s": {
"$ref": "#/components/schemas/summary"
},
"excessliquidity": {
"$ref": "#/components/schemas/summary"
},
"excessliquidity-c": {
"$ref": "#/components/schemas/summary"
},
"excessliquidity-f": {
"$ref": "#/components/schemas/summary"
},
"excessliquidity-s": {
"$ref": "#/components/schemas/summary"
},
"fullavailablefunds": {
"$ref": "#/components/schemas/summary"
},
"fullavailablefunds-c": {
"$ref": "#/components/schemas/summary"
},
"fullavailablefunds-f": {
"$ref": "#/components/schemas/summary"
},
"fullavailablefunds-s": {
"$ref": "#/components/schemas/summary"
},
"fullexcessliquidity": {
"$ref": "#/components/schemas/summary"
},
"fullexcessliquidity-c": {
"$ref": "#/components/schemas/summary"
},
"fullexcessliquidity-f": {
"$ref": "#/components/schemas/summary"
},
"fullexcessliquidity-s": {
"$ref": "#/components/schemas/summary"
},
"fullinitmarginreq": {
"$ref": "#/components/schemas/summary"
},
"fullinitmarginreq-c": {
"$ref": "#/components/schemas/summary"
},
"fullinitmarginreq-f": {
"$ref": "#/components/schemas/summary"
},
"fullinitmarginreq-s": {
"$ref": "#/components/schemas/summary"
},
"fullmaintmarginreq": {
"$ref": "#/components/schemas/summary"
},
"fullmaintmarginreq-c": {
"$ref": "#/components/schemas/summary"
},
"fullmaintmarginreq-f": {
"$ref": "#/components/schemas/summary"
},
"fullmaintmarginreq-s": {
"$ref": "#/components/schemas/summary"
},
"grosspositionvalue": {
"$ref": "#/components/schemas/summary"
},
"grosspositionvalue-c": {
"$ref": "#/components/schemas/summary"
},
"grosspositionvalue-f": {
"$ref": "#/components/schemas/summary"
},
"grosspositionvalue-s": {
"$ref": "#/components/schemas/summary"
},
"guarantee": {
"$ref": "#/components/schemas/summary"
},
"guarantee-c": {
"$ref": "#/components/schemas/summary"
},
"guarantee-f": {
"$ref": "#/components/schemas/summary"
},
"guarantee-s": {
"$ref": "#/components/schemas/summary"
},
"highestseverity": {
"$ref": "#/components/schemas/summary"
},
"highestseverity-c": {
"$ref": "#/components/schemas/summary"
},
"highestseverity-f": {
"$ref": "#/components/schemas/summary"
},
"highestseverity-s": {
"$ref": "#/components/schemas/summary"
},
"indianstockhaircut": {
"$ref": "#/components/schemas/summary"
},
"indianstockhaircut-c": {
"$ref": "#/components/schemas/summary"
},
"indianstockhaircut-f": {
"$ref": "#/components/schemas/summary"
},
"indianstockhaircut-s": {
"$ref": "#/components/schemas/summary"
},
"initmarginreq": {
"$ref": "#/components/schemas/summary"
},
"initmarginreq-c": {
"$ref": "#/components/schemas/summary"
},
"initmarginreq-f": {
"$ref": "#/components/schemas/summary"
},
"initmarginreq-s": {
"$ref": "#/components/schemas/summary"
},
"leverage": {
"$ref": "#/components/schemas/summary"
},
"leverage-c": {
"$ref": "#/components/schemas/summary"
},
"leverage-f": {
"$ref": "#/components/schemas/summary"
},
"leverage-s": {
"$ref": "#/components/schemas/summary"
},
"lookaheadavailablefunds": {
"$ref": "#/components/schemas/summary"
},
"lookaheadavailablefunds-c": {
"$ref": "#/components/schemas/summary"
},
"lookaheadavailablefunds-f": {
"$ref": "#/components/schemas/summary"
},
"lookaheadavailablefunds-s": {
"$ref": "#/components/schemas/summary"
},
"lookaheadexcessliquidity": {
"$ref": "#/components/schemas/summary"
},
"lookaheadexcessliquidity-c": {
"$ref": "#/components/schemas/summary"
},
"lookaheadexcessliquidity-f": {
"$ref": "#/components/schemas/summary"
},
"lookaheadexcessliquidity-s": {
"$ref": "#/components/schemas/summary"
},
"lookaheadinitmarginreq": {
"$ref": "#/components/schemas/summary"
},
"lookaheadinitmarginreq-c": {
"$ref": "#/components/schemas/summary"
},
"lookaheadinitmarginreq-f": {
"$ref": "#/components/schemas/summary"
},
"lookaheadinitmarginreq-s": {
"$ref": "#/components/schemas/summary"
},
"lookaheadmaintmarginreq": {
"$ref": "#/components/schemas/summary"
},
"lookaheadmaintmarginreq-c": {
"$ref": "#/components/schemas/summary"
},
"lookaheadmaintmarginreq-f": {
"$ref": "#/components/schemas/summary"
},
"lookaheadmaintmarginreq-s": {
"$ref": "#/components/schemas/summary"
},
"lookaheadnextchange": {
"$ref": "#/components/schemas/summary"
},
"maintmarginreq": {
"$ref": "#/components/schemas/summary"
},
"maintmarginreq-c": {
"$ref": "#/components/schemas/summary"
},
"maintmarginreq-f": {
"$ref": "#/components/schemas/summary"
},
"maintmarginreq-s": {
"$ref": "#/components/schemas/summary"
},
"netliquidation": {
"$ref": "#/components/schemas/summary"
},
"netliquidation-c": {
"$ref": "#/components/schemas/summary"
},
"netliquidation-f": {
"$ref": "#/components/schemas/summary"
},
"netliquidation-s": {
"$ref": "#/components/schemas/summary"
},
"netliquidationuncertainty": {
"$ref": "#/components/schemas/summary"
},
"nlvandmargininreview": {
"$ref": "#/components/schemas/summary"
},
"pasharesvalue": {
"$ref": "#/components/schemas/summary"
},
"pasharesvalue-c": {
"$ref": "#/components/schemas/summary"
},
"pasharesvalue-f": {
"$ref": "#/components/schemas/summary"
},
"pasharesvalue-s": {
"$ref": "#/components/schemas/summary"
},
"postexpirationexcess": {
"$ref": "#/components/schemas/summary"
},
"postexpirationexcess-c": {
"$ref": "#/components/schemas/summary"
},
"postexpirationexcess-f": {
"$ref": "#/components/schemas/summary"
},
"postexpirationexcess-s": {
"$ref": "#/components/schemas/summary"
},
"postexpirationmargin": {
"$ref": "#/components/schemas/summary"
},
"postexpirationmargin-c": {
"$ref": "#/components/schemas/summary"
},
"postexpirationmargin-f": {
"$ref": "#/components/schemas/summary"
},
"postexpirationmargin-s": {
"$ref": "#/components/schemas/summary"
},
"previousdayequitywithloanvalue": {
"$ref": "#/components/schemas/summary"
},
"previousdayequitywithloanvalue-c": {
"$ref": "#/components/schemas/summary"
},
"previousdayequitywithloanvalue-f": {
"$ref": "#/components/schemas/summary"
},
"previousdayequitywithloanvalue-s": {
"$ref": "#/components/schemas/summary"
},
"segmenttitle-c": {
"$ref": "#/components/schemas/summary"
},
"segmenttitle-f": {
"$ref": "#/components/schemas/summary"
},
"segmenttitle-s": {
"$ref": "#/components/schemas/summary"
},
"totalcashvalue": {
"$ref": "#/components/schemas/summary"
},
"totalcashvalue-c": {
"$ref": "#/components/schemas/summary"
},
"totalcashvalue-f": {
"$ref": "#/components/schemas/summary"
},
"totalcashvalue-s": {
"$ref": "#/components/schemas/summary"
},
"totaldebitcardpendingcharges": {
"$ref": "#/components/schemas/summary"
},
"totaldebitcardpendingcharges-c": {
"$ref": "#/components/schemas/summary"
},
"totaldebitcardpendingcharges-f": {
"$ref": "#/components/schemas/summary"
},
"totaldebitcardpendingcharges-s": {
"$ref": "#/components/schemas/summary"
},
"tradingtype-f": {
"$ref": "#/components/schemas/summary"
},
"tradingtype-s": {
"$ref": "#/components/schemas/summary"
}
}
}
}
}
}
}
}
},
"/portfolio/{accountId}/ledger": {
"get": {
"summary": "Account Ledger",
"description": "Information regarding settled cash, cash balances, etc. in the account's base currency and any other cash balances hold in other currencies. /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint. The list of supported currencies is available at https://www.interactivebrokers.com/en/index.php?f=3185.",
"tags": [
"Account",
"Portfolio"
],
"parameters": [
{
"name": "accountId",
"in": "path",
"required": true,
"description": "account id",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "200 means successful",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"BASE": {
"$ref": "#/components/schemas/ledger"
}
}
}
}
}
}
}
}
},
"/portfolio/positions/{conid}": {
"get": {
"summary": "Positions by Conid",
"description": "Returns an object of all positions matching the conid for all the selected accounts. For portfolio models the conid could be in more than one model, returning an array with the name of the model it belongs to. /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint.",
"tags": [
"Portfolio"
],
"parameters": [
{
"name": "conid",
"in": "path",
"required": true,
"description": "contract id",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "returns an object containing account and its position information",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ACCTID": {
"$ref": "#/components/schemas/position"
}
}
}
}
}
}
}
}
},
"/tickle": {
"post": {
"summary": "Ping the server to keep the session open",
"description": "If the gateway has not received any requests for several minutes an open session will automatically timeout. The tickle endpoint pings the server to prevent the session from ending.",
"tags": [
"Session"
],
"responses": {
"200": {
"description": "confirms session is open"
}
}
}
},
"/logout": {
"post": {
"summary": "Ends the current session",
"description": "Logs the user out of the gateway session. Any further activity requires re-authentication.",
"tags": [
"Session"
],
"responses": {
"200": {
"description": "returned status indicates if user is logged in",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"confirmed": {
"description": "true means username is still logged in, false means it is not",
"type": "boolean"
}
}
}
}
}
}
}
}
},
"/pa/performance": {
"post": {
"summary": "Account Performance",
"description": "Returns the performance (MTM) for the given accounts, if more than one account is passed, the result is consolidated.",
"tags": [
"PortfolioAnalyst"
],
"requestBody": {
"$ref": "#/components/requestBodies/Body"
},
"responses": {
"200": {
"description": "returns an object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/performance"
}
}
}
}
}
}
},
"/pa/summary": {
"post": {
"summary": "Account Balance's Summary",
"description": "Returns a summary of all account balances for the given accounts, if more than one account is passed, the result is consolidated.",
"tags": [
"PortfolioAnalyst"
],
"requestBody": {
"$ref": "#/components/requestBodies/Body"
},
"responses": {
"200": {
"description": "returns an object",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/summary"
}
}
}
}
}
}
},
"/trsrv/secdef": {
"post": {
"summary": "Secdef by Conid",
"description": "Returns a list of security definitions for the given conids",
"tags": [
"Contract"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"conids": {
"type": "array",
"items": {
"type": "integer",
"description": "contract id"
}
}
}
}
}
},
"description": "request body",
"required": true
},
"responses": {
"200": {
"description": "returns an array of secdef info",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/secdef"
}
}
}
}
}
}
},
"/trsrv/futures": {
"get": {
"summary": "Security Futures by Symbol",
"description": "Returns a list of non-expired future contracts for given symbol(s)",
"tags": [
"Contract"
],
"parameters": [
{
"in": "query",
"name": "symbols",
"description": "list of case-sensitive symbols separated by comma",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "returns an object with symbol and and array of its future contracts",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"symbol": {
"$ref": "#/components/schemas/futures"
}
}
}
}
}
},
"500": {
"description": "error while processing the request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
}
}
}
}
}
}
}
},
"/ibcust/entity/info": {
"get": {
"summary": "IBCust Entity Info",
"description": "Returns Applicant Id with all owner related entities",
"tags": [
"IBCust"
],
"responses": {
"200": {
"description": "Search result",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"applicantId": {
"type": "number"
},
"entities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"canTrade": {
"type": "boolean"
},
"canSign": {
"type": "boolean"
},
"type": {
"type": "string"
},
"name": {
"type": "object",
"properties": {
"salutation": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
}
}
},
"address": {
"type": "object",
"properties": {
"street": {
"type": "string"
},
"street2": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"country": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"compact": {
"type": "string"
}
}
},
"identDocs": {
"type": "array",
"items": {
"type": "object",
"items": {
"type": "object",
"properties": {
"country": {
"type": "string"
},
"state": {
"type": "string"
},
"type": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/fyi/unreadnumber": {
"get": {
"summary": "Get unread number of fyis",
"tags": [
"FYI"
],
"responses": {
"200": {
"description": "An object",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"BN": {
"type": "integer",
"description": "unread number"
}
}
}
}
}
}
}
}
},
"/fyi/settings": {
"get": {
"summary": "Get a list of subscriptions",
"tags": [
"FYI"
],
"description": "return the current choices of subscriptions, we can toggle the option\n",
"responses": {
"200": {
"description": "An array",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"A": {
"type": "integer",
"description": "optional, if A doesn't exist, it means user can't toggle this option. 0-off, 1-on."
},
"FC": {
"type": "string",
"description": "fyi code"
},
"H": {
"type": "integer",
"description": "disclaimer read, 1 = yes, = 0 no."
},
"FD": {
"type": "string",
"description": "detailed description"
},
"FN": {
"type": "string",
"description": "title"
}
}
}
}
}
}
}
}
}
},
"/fyi/settings/{typecode}": {
"post": {
"summary": "enable/disable certain subscription",
"tags": [
"FYI"
],
"parameters": [
{
"name": "typecode",
"in": "path",
"required": true,
"description": "fyi code",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "200 means successful",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/fyi/disclaimer/{typecode}": {
"get": {
"summary": "get disclaimer for a certain kind of fyi",
"tags": [
"FYI"
],
"parameters": [
{
"name": "typecode",
"in": "path",
"required": true,
"description": "fyi code, for example --M8, EA",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "receives the disclaimer message",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"DT": {
"type": "string",
"description": "disclaimer message"
},
"FC": {
"type": "string",
"description": "fyi code"
}
}
}
}
}
}
}
},
"put": {
"summary": "mark disclaimer read",
"tags": [
"FYI"
],
"parameters": [
{
"name": "typecode",
"in": "path",
"required": true,
"description": "fyi code, for example --M8, EA",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "200 means successful",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"T": {
"type": "integer"
},
"V": {
"type": "integer"
}
}
}
}
}
}
}
}
},
"/fyi/deliveryoptions": {
"get": {
"summary": "Get delivery options",
"tags": [
"FYI"
],
"description": "options for sending fyis to email and other devices\n",
"responses": {
"200": {
"description": "An object",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"M": {
"type": "integer",
"description": "Email option is enabled or not 0-off, 1-on."
},
"E": {
"type": "array",
"items": {
"type": "object",
"description": "device",
"properties": {
"NM": {
"type": "string",
"description": "device name"
},
"I": {
"type": "string",
"description": "device id"
},
"UI": {
"type": "string",
"description": "unique device id"
},
"A": {
"type": "string",
"description": "device is enabled or not 0-true, 1-false."
}
}
}
}
}
}
}
}
}
}
}
},
"/fyi/deliveryoptions/email": {
"put": {
"summary": "enable/disable email option",
"tags": [
"FYI"
],
"parameters": [
{
"name": "enabled",
"in": "query",
"required": true,
"description": "true/false",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "200 means successful",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"T": {
"type": "integer"
},
"V": {
"type": "integer"
}
}
}
}
}
}
}
}
},
"/fyi/deliveryoptions/device": {
"post": {
"summary": "enable/disable device option",
"tags": [
"FYI"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"devicename": {
"type": "string"
},
"deviceId": {
"type": "string"
},
"uiName": {
"type": "string"
},
"enabled": {
"type": "boolean"
}
}
}
}
},
"description": "device info",
"required": true
},
"responses": {
"200": {
"description": "200 means successful",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"T": {
"type": "integer"
},
"V": {
"type": "integer"
}
}
}
}
}
}
}
}
},
"/fyi/deliveryoptions/{deviceId}": {
"delete": {
"summary": "delete a device",
"tags": [
"FYI"
],
"parameters": [
{
"name": "deviceId",
"in": "path",
"required": true,
"description": "device ID",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "200 means successful",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
},
"/fyi/notifications": {
"get": {
"summary": "Get a list of notifications",
"tags": [
"FYI"
],
"parameters": [
{
"name": "exclude",
"in": "query",
"description": "if set, don't set include",
"schema": {
"type": "string"
}
},
{
"name": "include",
"in": "query",
"description": "if set, don't set exclude",
"schema": {
"type": "string"
}
},
{
"name": "max",
"in": "query",
"required": true,
"description": "max number of fyis in response",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "An array",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/notifications"
}
}
}
}
}
}
},
"/fyi/notifications/more": {
"get": {
"summary": "Get more notifications based on a certain one",
"tags": [
"FYI"
],
"parameters": [
{
"name": "id",
"in": "query",
"required": true,
"description": "id of last notification in the list",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "An array",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/notifications"
}
}
}
}
}
}
},
"/fyi/notifications/{notificationId}": {
"put": {
"summary": "Get a list of notifications",
"tags": [
"FYI"
],
"parameters": [
{
"name": "notificationId",
"in": "path",
"required": true,
"description": "mark a notification read",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "when 200 receives, it means successful",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://localhost:5000/v1/portal"
}
],
"components": {
"requestBodies": {
"Body": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"acctIds": {
"type": "array",
"items": {
"type": "string",
"description": "account id"
}
}
}
}
}
},
"description": "an array of account ids",
"required": true
}
},
"schemas": {
"authStatus": {
"type": "object",
"properties": {
"authenticated": {
"description": "Brokerage session is authenticated",
"type": "boolean"
},
"connected": {
"description": "Connected to backend",
"type": "boolean"
},
"competing": {
"description": "Brokerage session is competing, e.g. user is logged in to IBKR Mobile, WebTrader, TWS or other trading platforms.",
"type": "boolean"
},
"fail": {
"description": "Authentication failed, why.",
"type": "string"
},
"message": {
"description": "System messages that may affect trading",
"type": "string"
},
"prompts": {
"type": "array",
"description": "Prompt messages that may affect trading or the account",
"items": {
"type": "string"
}
}
}
},
"contract": {
"description": "Contains all details of the contract, including rules you can use when placing orders",
"type": "object",
"properties": {
"r_t_h": {
"type": "boolean",
"description": "true means you can trade outside RTH(regular trading hours)"
},
"con_id": {
"type": "string",
"description": "same as that in request"
},
"company_name": {
"type": "string"
},
"exchange": {
"type": "string"
},
"local_symbol": {
"type": "string",
"description": "for exmple FB"
},
"instrument_type": {
"type": "string",
"description": "for example STK"
},
"currency": {
"type": "string"
},
"companyName": {
"type": "string"
},
"category": {
"type": "string"
},
"industry": {
"type": "string"
},
"rules": {
"type": "object",
"properties": {
"orderTypes": {
"type": "array",
"items": {
"type": "string",
"description": "store available order types for this contract"
}
},
"orderTypesOutside": {
"type": "array",
"items": {
"type": "string",
"description": "store available order types for this contract outside regular hours"
}
},
"defaultSize": {
"type": "number",
"description": "default quantity you can use to place an order"
},
"sizeIncrement": {
"type": "number"
},
"tifTypes": {
"type": "array",
"items": {
"type": "string",
"description": "store available time-in-force types"
}
},
"limitPrice": {
"type": "number",
"description": "default limit price you can use to prefill your order"
},
"stopprice": {
"type": "number",
"description": "default stop price you can use to prefill your order"
},
"preview": {
"type": "boolean",
"description": "if you can preview the order or not with the whatif end-point"
},
"displaySize": {
"type": "string"
},
"increment": {
"type": "string"
}
}
}
}
},
"history-data": {
"type": "object",
"properties": {
"start": {
"description": "start date time",
"type": "string"
},
"mdAvailability": {
"type": "string",
"description": "Market Data Availability. The field may contain two chars. The first char is the primary code: R = Realtime, D = Delayed,\nZ = Frozen, Y = Frozen Delayed. The second char is the secondary code: P = Snapshot Available, p = Consolidated.\n"
},
"barLength": {
"type": "integer"
},
"delay": {
"type": "integer"
},
"high": {
"type": "string",
"description": "price/volume/..."
},
"low": {
"type": "string",
"description": "price/volume/..."
},
"symbol": {
"type": "string"
},
"text": {
"type": "string"
},
"tickNum": {
"type": "string"
},
"timePeriod": {
"type": "string"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"o": {
"type": "number",
"description": "open price"
},
"c": {
"type": "number",
"description": "close price"
},
"h": {
"type": "number",
"description": "high price"
},
"l": {
"type": "number",
"description": "low price"
},
"v": {
"type": "number",
"description": "volume"
},
"t": {
"type": "number",
"description": "unix time stamp"
}
}
}
},
"points": {
"type": "number",
"description": "total number of points"
},
"travelTime": {
"type": "number"
}
}
},
"trade": {
"type": "object",
"properties": {
"execution_id": {
"type": "string"
},
"symbol": {
"type": "string"
},
"side": {
"type": "string"
},
"order_description": {
"type": "string"
},
"trade_time": {
"type": "string"
},
"trade_time_r": {
"type": "number"
},
"size": {
"type": "string"
},
"price": {
"type": "string"
},
"submitter": {
"type": "string"
},
"exchange": {
"type": "string"
},
"comission": {
"type": "number"
},
"net_amount": {
"type": "number"
},
"account": {
"type": "string"
},
"company_name": {
"type": "string"
},
"contract_description_1": {
"type": "string"
},
"sec_type": {
"type": "string"
},
"conidex": {
"type": "string"
},
"position": {
"type": "string"
},
"clearing_id": {
"type": "string"
},
"clearing_name": {
"type": "string"
}
}
},
"modify-order": {
"type": "object",
"properties": {
"acctId": {
"type": "string"
},
"conid": {
"type": "integer"
},
"orderId": {
"type": "integer",
"description": "customer orderid"
},
"orderType": {
"type": "string",
"description": "for example LMT"
},
"outsideRTH": {
"type": "boolean"
},
"price": {
"type": "number"
},
"auxPrice": {
"type": "number"
},
"side": {
"type": "string",
"description": "SELL or BUY"
},
"listingExchange": {
"type": "string",
"description": "optional, not required"
},
"ticker": {
"type": "string"
},
"tif": {
"type": "string",
"description": "for example DAY"
},
"quantity": {
"type": "number",
"description": "usually integer, for some special cases can be float numbers"
}
}
},
"order-request": {
"type": "object",
"properties": {
"acctId": {
"description": "acctId is optional. It should be one of the accounts returned by\n/iserver/accounts. If not passed, the first one in the list is selected.\n",
"type": "string"
},
"conid": {
"description": "conid is the identifier of the security you want to trade, you can find the\nconid with /iserver/secdef/search.\n",
"type": "integer"
},
"secType": {
"type": "string",
"description": "conid:type for example 265598:STK"
},
"cOID": {
"description": "Customer Order ID. An arbitraty string that can be used to identify the order, e.g "my-fb-order". The\nvalue must be unique for a 24h span. Please do not set this value for child orders when placing a bracket order.\n",
"type": "string"
},
"parentId": {
"description": "When placing bracket orders, the child parentId must be equal to the cOId (customer order id) of the parent.\n",
"type": "string"
},
"orderType": {
"description": "orderType can be one of MKT (Market), LMT (Limit), STP (Stop) or STP_LIMIT (stop limit)\n",
"type": "string"
},
"listingExchange": {
"description": "listingExchange is optional. By default we use "SMART" routing. Possible values are available via this end\npoint: /v1/portal/iserver/contract/{{conid}}/info, see valid_exchange: e.g: SMART,AMEX,NYSE,\nCBOE,ISE,CHX,ARCA,ISLAND,DRCTEDGE,BEX,BATS,EDGEA,CSFBALGO,JE FFALGO,BYX,IEX,FOXRIVER,TPLUS1,NYSENAT,PSX\n",
"type": "string"
},
"outsideRTH": {
"description": "set to true if the order can be executed outside regular trading hours.\n",
"type": "boolean"
},
"price": {
"description": "optional if order is MKT, for LMT, this is the limit price. For STP this is the stop price.\n",
"type": "number"
},
"side": {
"type": "string",
"description": "SELL or BUY"
},
"ticker": {
"description": "",
"type": "string"
},
"tif": {
"description": "GTC (Good Till Cancel) or DAY. DAY orders are automatically cancelled at the end of the Day or Trading hours.\n",
"type": "string"
},
"referrer": {
"description": "for example QuickTrade",
"type": "string"
},
"quantity": {
"description": "usually integer, for some special cases can be float numbers",
"type": "number"
},
"useAdaptive": {
"description": "If true, the system will use the Adaptive Algo to submit the order\nhttps://www.interactivebrokers.com/en/index.php?f=19091\n",
"type": "boolean"
}
}
},
"order": {
"description": "contains all the order related info",
"type": "object",
"properties": {
"acct": {
"type": "string",
"description": "account id"
},
"conid": {
"type": "integer"
},
"orderDesc": {
"type": "string"
},
"description1": {
"type": "string"
},
"ticker": {
"type": "string",
"description": "for exmple FB"
},
"secType": {
"type": "string",
"description": "for example STK"
},
"listingExchange": {
"type": "string",
"description": "for example NASDAQ.NMS"
},
"remainingQuantity": {
"type": "string"
},
"filledQuantity": {
"type": "string"
},
"companyName": {
"type": "string"
},
"status": {
"type": "string",
"description": "PendingSubmit - Indicates the order was sent, but confirmation has not been received that it has been received by the destination. \n Occurs most commonly if an exchange is closed.\nPendingCancel - Indicates that a request has been sent to cancel an order but confirmation has not been received of its cancellation. PreSubmitted - Indicates that a simulated order type has been accepted by the IBKR system and that this order has yet to be elected. \n The order is held in the IBKR system until the election criteria are met. At that time the order is transmitted to the order destination as specified. \nSubmitted - Indicates that the order has been accepted at the order destination and is working. Cancelled - Indicates that the balance of the order has been confirmed cancelled by the IB system. \n This could occur unexpectedly when IB or the destination has rejected the order. \nFilled - Indicates that the order has been completely filled. Inactive - Indicates the order is not working, for instance if the order was invalid and triggered an error message,\n or if the order was to short a security and shares have not yet been located. \n"
},
"origOrderType": {
"type": "string",
"description": "for example Limit"
},
"side": {
"type": "string",
"description": "BUY or SELL"
},
"price": {
"type": "number"
},
"bgColor": {
"type": "string",
"description": "back-ground color"
},
"fgColor": {
"type": "string"
},
"orderId": {
"type": "integer"
},
"parentId": {
"description": "Only exists in child order of bracket",
"type": "integer"
}
}
},
"scanner-params": {
"type": "object",
"properties": {
"instrument": {
"type": "string",
"description": "for example-STK"
},
"type": {
"type": "string",
"description": "for example-TOP_PERC_GAIN"
},
"filter": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"value": {
"type": "number"
}
}
}
},
"location": {
"type": "string"
},
"size": {
"type": "string"
}
}
},
"set-account": {
"type": "object",
"properties": {
"acctId": {
"type": "string",
"description": "Account ID"
}
}
},
"position": {
"type": "array",
"items": {
"type": "object",
"description": "Account Information",
"properties": {
"acctId": {
"type": "string"
},
"conid": {
"type": "integer"
},
"contractDesc": {
"type": "string"
},
"assetClass": {
"type": "string"
},
"position": {
"type": "number"
},
"mktPrice": {
"type": "number"
},
"mktValue": {
"type": "number"
},
"currency": {
"type": "string"
},
"avgCost": {
"type": "number"
},
"avgPrice": {
"type": "number"
},
"realizedPnl": {
"type": "number"
},
"unrealizedPnl": {
"type": "number"
},
"exchs": {
"type": "string"
},
"expiry": {
"type": "string"
},
"putOrCall": {
"type": "string"
},
"multiplier": {
"type": "number"
},
"strike": {
"type": "number"
},
"exerciseStyle": {
"type": "string"
},
"undConid": {
"type": "integer"
},
"conExchMap": {
"type": "array",
"items": {
"type": "string"
}
},
"baseMktValue": {
"type": "number"
},
"baseMktPrice": {
"type": "number"
},
"baseAvgCost": {
"type": "number"
},
"baseAvgPrice": {
"type": "number"
},
"baseRealizedPnl": {
"type": "number"
},
"baseUnrealizedPnl": {
"type": "number"
},
"name": {
"type": "string"
},
"lastTradingDay": {
"type": "string"
},
"group": {
"type": "string"
},
"sector": {
"type": "string"
},
"sectorGroup": {
"type": "string"
},
"ticker": {
"type": "string"
},
"undComp": {
"type": "string"
},
"undSym": {
"type": "string"
},
"fullName": {
"type": "string"
},
"pageSize": {
"type": "integer"
},
"model": {
"type": "string"
}
}
}
},
"allocation": {
"type": "array",
"items": {
"type": "object",
"description": "allocation",
"properties": {
"assetClass": {
"type": "object",
"description": "portfolio allocation by asset class",
"properties": {
"long": {
"type": "object",
"description": "long positions allocation",
"properties": {
"STK": {
"type": "number"
},
"OPT": {
"type": "number"
},
"FUT": {
"type": "number"
},
"WAR": {
"type": "number"
},
"BOND": {
"type": "number"
},
"CASH": {
"type": "number"
}
}
},
"short": {
"type": "object",
"description": "short positions allocation",
"properties": {
"STK": {
"type": "number"
},
"OPT": {
"type": "number"
},
"FUT": {
"type": "number"
},
"WAR": {
"type": "number"
},
"BOND": {
"type": "number"
},
"CASH": {
"type": "number"
}
}
}
}
},
"sector": {
"type": "object",
"description": "portfolio allocation by sector",
"properties": {
"long": {
"type": "object",
"description": "long positions allocation",
"properties": {
"Others": {
"type": "number"
},
"Utilities": {
"type": "number"
},
"Energy": {
"type": "number"
},
"Technology": {
"type": "number"
},
"Financial": {
"type": "number"
},
"Communications": {
"type": "number"
}
}
},
"short": {
"type": "object",
"description": "short positions allocation",
"properties": {
"Industrial": {
"type": "number"
},
"Consumer": {
"type": "number"
},
"Diversified": {
"type": "number"
}
}
}
}
},
"group": {
"type": "object",
"description": "portfolio allocation by group",
"properties": {
"long": {
"type": "object",
"description": "long positions allocation",
"properties": {
"Computers": {
"type": "number"
},
"Semiconductors": {
"type": "number"
},
"Others": {
"type": "number"
},
"Chemicals": {
"type": "number"
},
"Apparel": {
"type": "number"
},
"Communications": {
"type": "number"
}
}
},
"short": {
"type": "object",
"description": "short positions allocation",
"properties": {
"Banks": {
"type": "number"
},
"Airlines": {
"type": "number"
},
"Internet": {
"type": "number"
}
}
}
}
}
}
}
},
"accounts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/account"
}
},
"account": {
"type": "object",
"description": "account information",
"properties": {
"id": {
"type": "string"
},
"accountId": {
"type": "string"
},
"accountVan": {
"type": "string"
},
"accountTitle": {
"type": "string"
},
"displayName": {
"type": "string"
},
"accountAlias": {
"type": "string"
},
"accountStatus": {
"type": "number"
},
"currency": {
"type": "string"
},
"type": {
"type": "string"
},
"tradingType": {
"type": "string"
},
"faclient": {
"type": "boolean"
},
"parent": {
"type": "string"
},
"desc": {
"type": "string"
},
"covestor": {
"type": "boolean"
},
"master": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"officialTitle": {
"type": "string"
}
}
}
}
},
"summary": {
"type": "object",
"description": "account information",
"properties": {
"total": {
"type": "object",
"properties": {
"chg": {
"type": "string",
"description": "total change amount"
},
"rtn": {
"type": "string",
"description": "change percent"
},
"incompleteData": {
"type": "boolean",
"description": "set to true if any external account data is not available for starting or ending date, resulting in potentially unusual total values."
},
"endVal": {
"type": "string"
},
"startVal": {
"type": "string"
}
}
},
"startDate": {
"type": "string",
"description": "date format-- yyyy-MM-dd"
},
"excludedAccounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"lastUpdateAttempt": {
"type": "string"
},
"fiName": {
"type": "string"
},
"acctTitle": {
"type": "string"
},
"acctNumAtFI": {
"type": "string"
},
"acctId": {
"type": "string"
},
"lastUpdate": {
"type": "string"
},
"harvestCode": {
"type": "integer"
},
"lastUpdateStatusCode": {
"type": "string"
},
"rc": {
"type": "integer"
}
}
}
},
"lastSuccessfulUpdate": {
"type": "string"
},
"accountSummaries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"chg": {
"type": "string"
},
"hasAccounts": {
"type": "string"
},
"accountTypeName": {
"type": "string"
},
"rtn": {
"type": "string"
},
"endVal": {
"type": "string"
},
"accountTypeCode": {
"type": "string"
},
"startVal": {
"type": "string"
}
}
}
},
"endDate": {
"type": "string"
},
"hasExternalAccounts": {
"type": "boolean",
"description": "indicator of user having configured any external accounts"
},
"rc": {
"type": "integer"
},
"currency": {
"type": "string"
},
"userId": {
"type": "string"
},
"pm": {
"type": "string"
},
"view": {
"type": "string"
},
"balanceByDate": {
"type": "object",
"properties": {
"series": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"name": {
"type": "string"
},
"date": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
}
}
}
}
}
},
"ledger": {
"type": "object",
"properties": {
"commoditymarketvalue": {
"type": "number"
},
"futuremarketvalue": {
"type": "number"
},
"settledcash": {
"type": "number"
},
"exchangerate": {
"type": "number"
},
"sessionid": {
"type": "integer"
},
"cashbalance": {
"type": "number"
},
"corporatebondsmarketvalue": {
"type": "number"
},
"warrantsmarketvalue": {
"type": "number"
},
"netliquidationvalue": {
"type": "number"
},
"interest": {
"type": "number"
},
"unrealizedpnl": {
"type": "number"
},
"stockmarketvalue": {
"type": "number"
},
"moneyfunds": {
"type": "number"
},
"currency": {
"type": "string"
},
"realizedpnl": {
"type": "number"
},
"funds": {
"type": "number"
},
"acctcode": {
"type": "string"
},
"issueroptionsmarketvalue": {
"type": "number"
},
"key": {
"type": "string"
},
"timestamp": {
"type": "integer"
},
"severity": {
"type": "integer"
}
}
},
"calendar_request": {
"type": "object",
"properties": {
"date": {
"type": "object",
"properties": {
"start": {
"type": "string",
"description": "start date of a period. for example 20180808-0400"
},
"end": {
"type": "string",
"description": "end date of a period. for example 20180808-0400"
}
}
},
"filters": {
"type": "object",
"properties": {
"recently_held": {
"type": "string",
"description": "value can be 'true' or 'false'."
},
"corporate_earnings": {
"type": "string",
"description": "value can be 'true' or 'false'."
},
"DivExDates": {
"type": "string",
"description": "value can be 'true' or 'false'."
},
"ipo": {
"type": "string",
"description": "value can be 'true' or 'false'."
},
"splits": {
"type": "string",
"description": "value can be 'true' or 'false'."
},
"corporate_events": {
"type": "string",
"description": "value can be 'true' or 'false'."
},
"economic_events": {
"type": "string",
"description": "value can be 'true' or 'false'."
},
"option_show_monthly": {
"type": "string",
"description": "value can be 'true' or 'false'."
},
"option_show_weekly": {
"type": "string",
"description": "value can be 'true' or 'false'."
},
"country": {
"type": "string",
"description": "default is 'All'."
},
"limit": {
"type": "string",
"description": "default is '250'."
},
"limit_region": {
"type": "string",
"description": "default is '50'."
}
}
}
}
},
"events": {
"type": "array",
"description": "events",
"items": {
"type": "object",
"properties": {
"index_date_type": {
"type": "string"
},
"event_type": {
"type": "string"
},
"data": {
"type": "object",
"description": "will be different for different event types"
},
"conids": {
"type": "array",
"items": {
"type": "string",
"description": "conid in string"
}
},
"index_date": {
"type": "string",
"description": "for exmple 20180817T040000+0000"
},
"source": {
"type": "string",
"description": "for example RSE"
},
"event_key": {
"type": "string",
"description": "for example 11662135"
},
"tooltips": {
"type": "object"
},
"status": {
"type": "string"
}
}
}
},
"performance": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"cps": {
"type": "object",
"description": "Cumulative performance data",
"properties": {
"dates": {
"type": "array",
"description": "array of dates, the length should be same as the length of returns inside data.",
"items": {
"type": "string",
"description": "format-- yyyyMMdd"
}
},
"freq": {
"type": "string",
"description": "D means Day"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"idType": {
"type": "string",
"description": "for example-- acctid"
},
"start": {
"type": "string",
"description": "start date-- yyyyMMdd"
},
"baseCurrency": {
"type": "string"
},
"returns": {
"type": "array",
"description": "each value stands for price change percent of corresponding date in dates array",
"items": {
"type": "number"
}
},
"end": {
"type": "string",
"description": "end date-- yyyyMMdd"
}
}
}
}
}
},
"tpps": {
"type": "object",
"description": "Time period performance data",
"properties": {
"dates": {
"type": "array",
"description": "array of dates, the length should be same as the length of returns inside data.",
"items": {
"type": "string",
"description": "format-- yyyyMMdd"
}
},
"freq": {
"type": "string",
"description": "M means Month"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"idType": {
"type": "string",
"description": "for example-- acctid"
},
"start": {
"type": "string",
"description": "start date-- yyyyMMdd"
},
"baseCurrency": {
"type": "string"
},
"returns": {
"type": "array",
"description": "each value stands for price change percent of corresponding date in dates array",
"items": {
"type": "number"
}
},
"end": {
"type": "string",
"description": "end date-- yyyyMMdd"
}
}
}
}
}
},
"nav": {
"type": "object",
"description": "Net asset value data for the account or consolidated accounts. NAV data is not applicable to benchmarks.",
"properties": {
"dates": {
"type": "array",
"description": "array of dates, the length should be same as the length of returns inside data.",
"items": {
"type": "string",
"description": "format--yyyyMMdd"
}
},
"freq": {
"type": "string",
"description": "D means Day"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"idType": {
"type": "string",
"description": "for example-- acctid"
},
"start": {
"type": "string",
"description": "start date-- yyyyMMdd"
},
"baseCurrency": {
"type": "string"
},
"returns": {
"type": "array",
"description": "each value stands for price change percent of corresponding date in dates array",
"items": {
"type": "number"
}
},
"end": {
"type": "string",
"description": "end date-- yyyyMMdd"
}
}
}
}
}
},
"pm": {
"type": "string"
},
"included": {
"type": "array",
"items": {
"type": "string",
"description": "account id"
}
},
"currencyType": {
"type": "string"
},
"rc": {
"type": "integer"
}
}
},
"secdef": {
"type": "array",
"items": {
"type": "object",
"description": "security definition information",
"properties": {
"conid": {
"type": "integer"
},
"name": {
"type": "string"
},
"assetClass": {
"type": "string"
},
"expiry": {
"type": "string"
},
"lastTradingDay": {
"type": "string"
},
"group": {
"type": "string"
},
"putOrCall": {
"type": "string"
},
"sector": {
"type": "string"
},
"sectorGroup": {
"type": "string"
},
"strike": {
"type": "number"
},
"ticker": {
"type": "string"
},
"undConid": {
"type": "integer"
},
"fullName": {
"type": "string"
},
"pageSize": {
"type": "integer"
}
}
}
},
"futures": {
"type": "array",
"items": {
"type": "object",
"description": "future contract information",
"properties": {
"symbol": {
"type": "string"
},
"conid": {
"type": "integer",
"description": "conid of the future contract"
},
"underlyingConid": {
"type": "integer"
},
"expirationDate": {
"type": "string"
},
"ltd": {
"type": "string",
"description": "last trading day"
}
}
}
},
"notifications": {
"type": "array",
"items": {
"type": "object",
"description": "notification",
"properties": {
"D": {
"type": "string",
"description": "notification date"
},
"ID": {
"type": "string",
"description": "unique way to reference this notification"
},
"FC": {
"type": "string",
"description": "FYI code, we can use it to find whether the disclaimer is accepted or not in settings"
},
"MD": {
"type": "string",
"description": "content of notification"
},
"MS": {
"type": "string",
"description": "title of notification"
},
"R": {
"type": "string",
"description": "0-unread, 1-read"
}
}
}
}
}
}
}
'''