Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fidelity broker #7

Open
mafischer opened this issue Jan 25, 2021 · 4 comments
Open

Add Fidelity broker #7

mafischer opened this issue Jan 25, 2021 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed P3 Eventually; low priority

Comments

@mafischer
Copy link
Owner

Add Fidelity broker

  • API functions should be async
  • API function names should match the robinhood api function names
@mafischer mafischer added enhancement New feature or request help wanted Extra attention is needed labels Jan 25, 2021
@mafischer mafischer added this to the support 10+ brokers milestone Jan 25, 2021
@mafischer mafischer added the P3 Eventually; low priority label Jan 25, 2021
@mafischer
Copy link
Owner Author

method: POST
endpoint: https://brokerage.fidelity.com/ftgw/brkg/equityticket/balance
body:

{"acctNum": "X00000000"}

resposne:

[
  {
    "acctNum": "X00000000",
    "brokerageAcctDetail": {
      "asOfDateTime": 1612201675,
      "recentBalanceDetail": {
        "asOfDateTime": 1612201675,
        "acctValDetail": {
          "netWorth": 1.00,
          "netWorthChg": 1.00,
          "netWorthChgPct": 0.00,
          "marketVal": 1.00,
          "marketValChg": 0.00,
          "marketValChgPct": 0.00,
          "acctEqtyPct": 100,
          "hasUnpricedPosition": false,
          "regulatoryNetWorth": 1.00
        },
        "cashDetail": {
          "heldInCash": 1.00,
          "heldInCashChg": 0.00,
          "coreBalance": 110,
          "creditDebit": -0.58,
          "creditDebitChg": 0,
          "settledAmt": 1.00
        },
        "buyingPowerDetail": {
          "cash": 1.00,
          "cashChg": 0,
          "margin": 1.00,
          "marginChg": 0,
          "nonMargin": 1.00,
          "nonMarginChg": 0,
          "withoutMarginImpact": 1.00,
          "withoutMarginImpactChg": 0,
          "cashCmtdToOpenOrder": 0,
          "cashMarginCmtdToOpenOrder": 0
        }
      }
    }
  }
]

@mafischer
Copy link
Owner Author

mafischer commented Feb 1, 2021

method: POST
endpoint: https://brokerage.fidelity.com/ftgw/brkg/equityticket/getquote
body:

{
    "symbols": "EXROF"
}

resposne:

{
    "SYMBOL": "EXROF",
    "STATUS": {
        "ERROR_CODE": "0",
        "ERROR_TEXT": ""
    },
    "QUOTE_DATA": {
        "ASK_PRICE": "2.97",
        "ASK_SIZE": "18700",
        "BID_PRICE": "2.95",
        "BID_SIZE": "1967",
        "LAST_PRICE": "2.95",
        "LAST_SIZE": "100",
        "NETCHG_TODAY": "0.02",
        "NAME": "EXRO TECHNOLOGIES INC",
        "PCT_CHG_TODAY": "0.682594",
        "VOLUME": "240163",
        "EXCHANGE_TRADED_TYPE": "",
        "CUSIP": "30222R109",
        "OPEN_PRICE": "3.00",
        "PREV_CLOSE_PRICE": "2.93",
        "AVG_VOL_90_DAY": "534746",
        "EARNING_QTR_REPORT_DATE": "",
        "CASH_DIV_EX_DATE": "",
        "DAY_HIGH": "3.04",
        "DAY_LOW": "2.83",
        "YEAR_HIGH_PRICE": "3.93",
        "YEAR_LOW_PRICE": "0.15",
        "FINANCIAL_STAT_IND": "N",
        "EARNING_PRIOR_QTR_REPORT_DATE": "",
        "TRADING_SYMBOL": "",
        "ASK_EXCHANGE_MIC": "",
        "BID_EXCHANGE_MIC": "",
        "LAST_EXCHANGE_MIC": "",
        "SECURITY_TYPE": "Equity"
    }
}

@mafischer
Copy link
Owner Author

method: POST
endpoint: https://brokerage.fidelity.com/ftgw/brkg/equityticket/extendedhour
body: n/a
response:

{
    "sessionType": "CLO"
}

@mafischer
Copy link
Owner Author

method: GET
endpoint: https://www.fidelity.com/search/autosuggest?callback=searchJSONCallback&q=ts
response:

[
    {
        "quotes": {
            "count": 6,
            "suggestions": [
                {
                    "term": "TS",
                    "count": 334,
                    "desc": "TENARIS ADR REP 2 ORD SHS",
                    "symbol": "TS",
                    "cusip": "88031M109",
                    "url": "https://eresearch.fidelity.com/eresearch/goto/evaluate/snapshot.jhtml?symbols=TS"
                },
                {
                    "term": "TSLA",
                    "count": 31277192,
                    "desc": "TESLA ORD SHS",
                    "symbol": "TSLA",
                    "cusip": "88160R101",
                    "url": "https://eresearch.fidelity.com/eresearch/goto/evaluate/snapshot.jhtml?symbols=TSLA"
                },
                {
                    "term": "TSM",
                    "count": 4957258,
                    "desc": "TAIWAN SEMICONDUCTOR MANUFACTURING ADR REPRESENTING FIVE ORD SHS",
                    "symbol": "TSM",
                    "cusip": "874039100",
                    "url": "https://eresearch.fidelity.com/eresearch/goto/evaluate/snapshot.jhtml?symbols=TSM"
                },
                {
                    "term": "TSNP",
                    "count": 2327978,
                    "desc": "TESORO ENTERPRISES ORD SHS",
                    "symbol": "TSNP",
                    "cusip": "881608103",
                    "url": "https://eresearch.fidelity.com/eresearch/goto/evaluate/snapshot.jhtml?symbols=TSNP"
                },
                {
                    "term": "TSN",
                    "count": 868906,
                    "desc": "TYSON FOODS ORD SHS CLASS A",
                    "symbol": "TSN",
                    "cusip": "902494103",
                    "url": "https://eresearch.fidelity.com/eresearch/goto/evaluate/snapshot.jhtml?symbols=TSN"
                },
                {
                    "term": "TSCO",
                    "count": 534747,
                    "desc": "TRACTOR SUPPLY ORD SHS",
                    "symbol": "TSCO",
                    "cusip": "892356106",
                    "url": "https://eresearch.fidelity.com/eresearch/goto/evaluate/snapshot.jhtml?symbols=TSCO"
                }
            ]
        }
    },
    {
        "keywords": {
            "count": 0,
            "suggestions": []
        }
    },
    {
        "exception": []
    }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed P3 Eventually; low priority
Projects
None yet
Development

No branches or pull requests

1 participant