- Rate limiting tracking on the client
- Determine best type (probably not float64) for holding currency
- Handle errors gracefully
-
json: Invalid access token
-
json: cannot unmarshal number 0E-8 into Go value of type int
onLastFillQuantity
and such - Better error handling on
MarshalJSON
andUnmarshalJSON
-
- Change slice of objects to slice of pointers on structs
- Godocs
- Fix time zone. Get:"2016-08-05T17:24:34Z" | Want:"2016-08-05T17:24:34.000Z"
- Fix quotes to markets/quotes
- Fix OrderService to OrdersService
There are case where the endpoint returns 200, but there is an actual error.
For example on /v1/accounts/{account_id}/orders
:
{
"errors": {
"error": [
"Backoffice rejected override of the order.",
"InitialMargin"
]
}
}
Structs that are basically wrappers around slices (i.e. Orders
) could be turned directly into slices. There would have to be changes in MarshalJSON() and UnmarshalJSON() for this to work. This way the underlying slice object can be accessed directly. In other words, Orders.Order[0]
could be turned into Orders[0]
.
endpoint | test coverage | docs | |
---|---|---|---|
user/profile | ✓ | ✓ | ✓ |
user/balances | ✓ | ✓ | |
user/positions | ✓ | ✓ | |
user/history | ✓ | ✓ | |
user/gainloss | ✓ | ✓ | |
user/orders | ✓ | ✓ |
-
FixOrdersAccountEntry
to dynamically map to object -
Order
should support indexing if it is a slice - Add a generic userRequest method that gets called by all user-related methods
endpoint | test coverage | docs | |
---|---|---|---|
account/balances | ✓ | ✓ | |
account/positions | ✓ | ✓ | |
account/history | ✓ | ✓ | |
account/gainloss | ✓ | ✓ | |
account/orders | ✓ | ✓ | |
account/orders/status | ✓ | ✓ |
endpoint | test coverage | docs | |
---|---|---|---|
order/create | ✓ | ✓ | |
order/create_multileg | ✓ | ✓ | |
order/preview | ✓ | ✓ | |
order/update | ✓ | ✓ | |
order/cancel | ✓ | ✓ |
endpoint | test coverage | docs | |
---|---|---|---|
GET markets/quotes | ✓ | ✓ | |
GET markets/timesales | ✓ | ✓ | ✓ |
GET markets/options/chains | |||
GET markets/options/strikes | |||
GET markets/options/expirations | |||
GET markets/history | |||
GET markets/clock | |||
GET markets/calendar | |||
GET markets/search | |||
GET markets/lookup |
The fundamental/ endpoint is still in beta, so most of the values in the JSON response has not been normalized. Thus, its equivalent methods will probably not be implemented in the near future until there is stable release from Tradier, or unless there is a desire from the community to do so.
endpoint | test coverage | docs | |
---|---|---|---|
GET watchlists | ✓ | ✓ | |
GET watchlist/{id} | ✓ | ✓ | |
POST watchlist | ✓ | ✓ | |
PUT watchlist | ✓ | ✓ | |
DELETE watchlist | ✓ | ✓ | |
POST watchlists/{id}/symbols | ✓ | ✓ | |
DELETE watchlists/{id}/symbols | ✓ | ✓ |
Unmarshaling the object from /user/orders
returns JSON with orders object double wrapped:
"orders": {
"orders": {
"order": [
...
]
}
}