Paradigm Developer Portal
Ask or search…
K

OBv1 (Coming Soon)

Paradigm operates Auto-Market Makers running on our Test environment. All available and created OBs will have markets made upon them.

OB: High Level

Order Books (OB) are centered around the concepts of "OBs", "Quotes", and "Trades":
  • OBs are globally and publicly available strategies comprised of one or more instruments with specific quantity ratio attributes.
  • Quotes are created by Takers and Makers as Quotes upon the Quote Book.
  • Trades occur when Orders (from Takers) and Quotes (from Makers) are matched and sent for clearing & settlement.
At a high level, the OB workflow is:
  1. 1.
    Taker creates an OB with the desired Instruments and quantity ratios.
  2. 2.
    Makers Quote the OB.
  3. 3.
    Takers can submits a Quote which suits the set Limit Price & venue enforced "Block Size Minimums".
  4. 4.
    When two quotes are crossed, the executions are sent to the underlying venue for clearing & settlement.
  5. 5.
    Taker and Maker of the trade receive confirmation if clearing & settlement was successful or rejected.
  6. 6.
    All Paradigm users are able to see cleared & settled Trades, but NOT the counterparties or the traded OB/Quote side.

Key OB Concepts

In OBs,
  • OBs are public auctions and all have open Quote Books.
  • You do NOT select counterparties, anyone is able to contribute/execute upon the Quote Book.
  • All trades are on an anonymous basis with no participant or directional information revealed.
  • All resulting executions are subject to some venues' determined "Block Size Minimum". Paradigm will enforce this validation at the Quote & Order Execution level.
  • There are partials fills of Quotes
  • It is possible to have multiple trades where a number of Quotes are consumed by a single Quote.
  • WebSocket messages will contain two keys, kind and status. You should use these keys to know the status and finality of the concept it's referring too.

OB: Executable Quote Book

OBs are comprised of individual Quotes which are not aggregated by price level as is usual with standard centralized Quote Books. This was principally done to accommodate venue-created & enforced "Block Size Minimums".
Not all venues have "Block Size Minimums", most notably Bybit, but the workflows for ranking+aggregating what is actually executable is the same for all venues with OB.
So as the user, you are likely to have the following questions:
  • Q: "What's the priority of Quotes as part of an OB?"
    • A: Paradigm prioritizes Quotes based upon Price & Time priority. This is the same prioritization mechanism as centralized Quote Books.
  • Q: "How does the Block Size Minimum affect what I can execute?"
    • A: As Paradigm must conform to the venue enforced Block Size Minimum, so too must you. This means a number of things:
      • All Quotes must meet the Block Size Minimum Quantity requirement.
      • All Orders must meet the Block Size Minimum Quantity requirement.
      • Paradigm will consume multiple Quotes as part of a single Order Execution. If part of a Quote is consumed and the remaining quantity is below the Block Size Minimum, this Quote will be canceled.
      • Orders will consume Quotes up to the specified Limit Price, but may not be able to execute the complete requested quantity.

Code Examples

Reach out if you ever need any help! We are more than happy to help.
You will need to update the provided Code Examples with your own Paradigm Access Key and Secret Key.
You can find all existing examples on our GitHub: https://github.com/tradeparadigm/code-samples
Note: All examples in this section are in Python3.