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

Update FNS with book building algorithm overview + fill amounts clarification #245

Merged
merged 8 commits into from
Jul 30, 2024

Conversation

matthewdowney
Copy link
Contributor

@matthewdowney matthewdowney commented Jul 24, 2024

This PR:

  • Adds a high level summary of how to maintain an order book state
  • Describes fill amounts in greater detail (that you need both ClobMatch and OrderUpdateV1 to know the book state)
  • Moves the FNS docs from the validators / infra section to the API section (probably means it's best to look at the first commit to review content changes)

Copy link

vercel bot commented Jul 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v4-teacher ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2024 8:50pm

2. Discard messages until you receive a `StreamOrderbookUpdate` with `snapshot` set to `true`. This message contains the full orderbook state for each clob pair.
3. When you see an `OrderPlaceV1` message, insert the order into the book at the end of the queue on its price level. Track the order's initial quantums (quantity) and total filled quantums.
4. When you see an `OrderUpdateV1` message, update the order's total filled quantums.
5. When you see a `ClobMatch` (trade) message, update the total filled quantums for each maker order filled using the `fill_amounts` field.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like adding some note as to why there's both OrderUpdateV1 and ClobMatch would be helpful. I could imagine this be really confusing why there are two different messages that feel like they are keeping tracking of the exact same thing.

Copy link
Contributor

@zachfc zachfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All suggestions, no must fix problems I see. Biggest thing is that the titles get less consistent towards the bottom of the page, everything else market as a nit

pages/api_integration-full-node-streaming.md Outdated Show resolved Hide resolved
pages/api_integration-full-node-streaming.md Outdated Show resolved Hide resolved
2. Generate the protos: `make proto-gen && make proto-export-deps`.
3. The generated protos are now in the `.proto-export-deps` directory.
4. Use the protobuf compiler (protoc) to [generate stubs](https://protobuf.dev/getting-started/) in any supported language.
5. Follow the documentation to write a streaming client.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Follow the documentation to write a streaming client.
5. Follow the [composite client documentation](api_integration-clients/composite_client) to write a streaming client.

nit: is there a page we can link to? Above for example, I'm not sure that's the right page


</details>

## FAQs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there's another FAQ section within this one with questions and answers, I think this should either be:

  • renamed something more general like "Reference Material," or
  • deleted and the subsections elevated


Note that DeliverTx maps to exec mode `execModeFinalize`.

### What Are the Exec Modes?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make this fit a little better on this page, I suggest either:

  • renaming this to not be a question, e.g. "Exec Mode Reference", or
  • moving it to the FAQ section and reformatting it there (Q: what are... )

I also think the code snippet could stay expanded because it helps break up the page at a glace

@matthewdowney matthewdowney merged commit 48b9bed into main Jul 30, 2024
3 of 4 checks passed
@matthewdowney matthewdowney deleted the matt/clarify-fill-amounts branch July 30, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants