Skip to content

api portfolioinfo

ntwerd edited this page Apr 12, 2023 · 3 revisions

Portfolio Info


Returns json data about portfolio.

URL

http://122.8.148.106/robot/api/v1/portfolio/<brokerCode>/<accountNo>

Method:

GET

Required:

Header : X-API-KEY

Success Response:

  • Code: 200

    Content:

{
    "status": "T",
    "message": null,
    "data": {
        "portfolios": [[
            {
                "orderNo": null,
                "symbol": "AOT",
                "side": "B",
                "costAvg": 66.25,
                "costAmtVal": 0,
                "startVol": 100,
                "availVol": 100,
                "actVol": 100,
                "multiplier": 1,
                "prcAvg": 66.25,
                "prcAmtVal": 6625,
                "unrealized": 0,
                "unrealizedPercent": 0,
                "mktPrice": 66.25,
                "mktVal": 6625,
                "optVal": 0,
                "takeProfitPrice": null,
                "stopLossPrice": null,
                "notificationType": null,
                "nonCompliance": null,
                "stabilizationFlag": null,
                "beneficialSigns": null
            },
            {
                "orderNo": null,
                "symbol": "BEAUTY",
                "side": "B",
                "costAvg": 10.8,
                "costAmtVal": 0,
                "startVol": 100,
                "availVol": 100,
                "actVol": 100,
                "multiplier": 1,
                "prcAvg": 10.8,
                "prcAmtVal": 1080,
                "unrealized": 0,
                "unrealizedPercent": 0,
                "mktPrice": 10.8,
                "mktVal": 1080,
                "optVal": 0,
                "takeProfitPrice": null,
                "stopLossPrice": null,
                "notificationType": null,
                "nonCompliance": null,
                "stabilizationFlag": null,
                "beneficialSigns": null
            }]
    }
}

Error Response:

  • Code: 200

    Content:

{
    "status": "F",
    "message": "Account not found",
    "data": {}
}

OR

  • Code: 200

    Content:

{
    "status": "F",
    "message": "Invalid api key",
    "data": {}
}

Clone this wiki locally