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

Query Orders nullable parameters #188

Open
Devel484 opened this issue Aug 16, 2022 · 1 comment
Open

Query Orders nullable parameters #188

Devel484 opened this issue Aug 16, 2022 · 1 comment
Assignees

Comments

@Devel484
Copy link

query.OrderAll:

export interface QueryAllOrderRequest {
    address: string;
    market: string;
    orderType: string;
    orderStatus: string;
    pagination?: PageRequest;
}

query.OrdersAccountOpen

export interface QueryAccountOpenOrdersRequest {
    address: string;
    market: string;
}

Fields are indicates to be required. Setting them to null cause a crash, setting them to empty strings will result in the desired effect.

const orders: QueryAllOrderResponse = await rpc.OrderAll({address: 'swth...', market: "", orderStatus: "", orderType: ""}

Will return all orders for the account.

@stevenkhong
Copy link
Contributor

These parameter fields generated protobuff codecs, and should ideally be fixed by properly typing fields in the carbon codebase. I have escalated the issue to the relevant team.

I will update this thread again.

@russellcxl russellcxl self-assigned this Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants