Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleA few points to note with Swagger:
  • It's cross platform and we can't control how it works / behaves - but it does save a lot of error prone typing.
  • Enums and Inheritance are a little flaky:
    • Enums for error codes / filters etc. are defined but are treated as strings in c# (so you will need to copy definitions from the swagger spec until this is fixed by swagger).
    • Inheritance is defined but not generated correctly - you will have to manually manipulate the op=<type> field
      • In c# JsonCreationConverter is the typical way to model inheritance
      • In java look at JsonSubTypes
  • We are not a REST service - so only the swagger generated model package is relevant.

 

Typical Interactions with Stream API:

The typical API interactions are documented below (detail is below this).

...

  • orderFilter (optional)

OrderFilter

This optional filter already filters by your account; but additional data shaping is supported

...

Line Markets

Line markets being sent on the Market Stream can be identified by the bettingType field of MarketDefinition (with value of "LINE").

The MarketDefinition of Line markets provide some additional fields that will be null for all other types,

  • lineMaxUnit - maximum value for the outcome, in market units for this market (eg 100 runs).
  • lineMinUnit - minimum value for the outcome, in market units for this market (eg 0 runs).
  • lineInterval - the odds ladder on this market will be between the range of lineMinUnit and lineMaxUnit, in increments of the interval value.e.g. If lineMinUnit=10 runs, lineMaxUnit=20 runs, lineInterval=0.5 runs, then valid odds include 10, 10.5, 11, 11.5 up to 20 runs.

 

For updates for Orders on Line markets received on the Order Stream be aware of how the following properties behave,

  • price - line markets operate at even-money odds of 2.0. However, price for these markets refers to the line positions available as defined by the markets min-max range and interval steps.
  • side - for Line markets a 'B' bet refers to a SELL line and an 'L' bet refers to a BUY line.
  • averagePriceMatched - this value is not meaningful for activity on Line markets and is not guaranteed to be returned or maintained for these markets.

...