alpacahq / alpaca-ts

A TypeScript Node.js library for the https://alpaca.markets REST API and WebSocket streams.
ISC License
156 stars 42 forks source link

feat: update asset type definition #114

Closed pleopardi closed 11 months ago

pleopardi commented 1 year ago

The Asset type is not up-to-date with the actual data returned (see example below). This PR updates it.

This is the actual data I receive:

    {
        "id": "85aca3f6-b4f2-435b-b4b8-37faa9b10085",
        "class": "us_equity",
        "exchange": "NYSE",
        "symbol": "GRP.U",
        "name": "GRANITE REAL ESTATE INVESTMENT TRUST",
        "status": "active",
        "tradable": true,
        "marginable": true,
        "maintenance_margin_requirement": 30,
        "shortable": true,
        "easy_to_borrow": true,
        "fractionable": false,
        "attributes": [
            "ptp_with_exception"
        ]
    }

Reference: Alpaca docs for the asset entity

117 commented 11 months ago

see #113