MarkGalloway/wealthsimple-trade

Listing orders

Opened this issue ยท 3 comments

First, thanks for making this API available! ๐ŸŽ‰

I found that the only endpoint that didn't work for me was:

GET https://trade-service.wealthsimple.com/orders

which returned {"error"=>"Record not found"}

It seems this endpoint now requires an account_id parameter, like so:

GET https://trade-service.wealthsimple.com/orders?account_id=<ACCOUNT-ID>

(maybe it's not needed if you have a single account, but if you have multiple accounts, this parameter appears to be mandatory)

It appears that the endpoint will return results for the non-registered account, when the account_id parameter is omitted.

In effect,

GET https://trade-service.wealthsimple.com/orders

is equivalent to:

GET https://trade-service.wealthsimple.com/orders?account_id=<NON-REGISTERED-ACCOUNT-ID>

@vlad-pisanov Do you have a non-registered account?

@phuzybuny interesting find! I Both of my accounts are registered. That would explain it.

@vlad-pisanov Thanks for confirming.

Looks like the documentation can be updated to clarify the behaviour.