Skip to main content
POST
/
market_service.v1.MarketService
/
GetMarkets
GetMarkets
curl --request POST \
  --url https://api.fairground.fi/market_service.v1.MarketService/GetMarkets \
  --header 'Authorization: Bearer <token>' \
  --header 'Connect-Protocol-Version: <connect-protocol-version>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "markets": [
    {
      "marketId": 123,
      "marketName": "<string>",
      "minLeverage": 123,
      "maxLeverage": 123,
      "minTradeSize": 123,
      "maxTradeSize": 123,
      "tickDecimals": 123,
      "lotSize": 123,
      "sizeDecimals": 123,
      "creator": "<string>",
      "feeConfig": {
        "marketId": 123,
        "tradeFeePct": 123,
        "maxEntitlement": 123,
        "insuranceFundEntitlementPct": 123,
        "maxImbalance": 123
      },
      "adlConfig": {
        "maintenanceMarginRatio": 123,
        "seizureThreshold": 123,
        "adlThreshold": 123,
        "shockFactor": 123,
        "maxIfFractionAllowed": 123
      },
      "tradeFeePct": 123,
      "longRevenue": 123,
      "shortRevenue": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Connect-Protocol-Version
enum<number>
required

Define the version of the Connect protocol

Available options:
1
Connect-Timeout-Ms
number

Define the timeout, in ms

Body

application/json

A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

Response

Success

markets
MarketConfig · object[]