dydxprotocol / v3-client

TypeScript client for dYdX (v3 API).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not find a piece of example/test/documentation how to call this function.

gymad opened this issue · comments

async createOrder(

I get an "Order is not signed and client was not initialized with starkPrivateKey" error message whatever I try to do.

Is there anyone who has a working code for this and is able to share it? so that we can use it as a working example.
Pleaseeee

Note to authors: there should be a documentation thread that allows people to comment on issues with the documentation

GET v3/orders endpoint doc is confusing because it says at the top:

"Description: Get active (not filled or canceled) orders for a user by specified parameters"

But later in the doc it provides order statuses for closed orders, making it seem like you can pull for closed orders from this endpoint.

In other words, How does one poll for previously completed orders?

Note: I see that it is possible to poll for fills and retrieve the orders based on fill.orderId using getOrderById

here's a gist I am working on that will cover what you are asking for in the next cpl days

https://gist.github.com/snowkidind/9545ca43962dc1251a226031ea797b06

update: gist above is a somewhat complete example now