{"openapi":"3.1.0","info":{"title":"OpenAPI Hub API","version":"2026-09-12","description":"Registry-derived contract for 14 currently executable, read-only provider routes. Upstream availability and latency are not an SLA."},"servers":[{"url":"https://openapihub.dev"}],"paths":{"/run/dydx/v4/perpetualMarkets":{"get":{"operationId":"dydx_get_v4_perpetualmarkets","summary":"Perpetual market map: ticker, clobPairId, status, oracle and indexer prices, funding rate, open interest, volume, tick size and margin parameters.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"market","in":"query","required":false,"schema":{"type":"string"},"description":"Specific market ticker; omit for all markets.","example":"BTC-USD"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Maximum number of markets to return.","example":2}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/orderbooks/perpetualMarket/{market}":{"get":{"operationId":"dydx_get_v4_orderbooks_perpetualmarket_market","summary":"L2 order book for one perpetual market with bid/ask price, size and offsetting order counts.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"market","in":"path","required":true,"schema":{"type":"string"},"description":"Perpetual market ticker.","example":"BTC-USD"}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/trades/perpetualMarket/{market}":{"get":{"operationId":"dydx_get_v4_trades_perpetualmarket_market","summary":"Recent public trades for one perpetual market, newest first, with side, price, size and block height.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"market","in":"path","required":true,"schema":{"type":"string"},"description":"Perpetual market ticker.","example":"BTC-USD"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Maximum number of trades to return.","example":2},{"name":"startingBeforeOrAtHeight","in":"query","required":false,"schema":{"type":"integer"},"description":"Block height to start retrieving trades from.","example":99999999}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/candles/perpetualMarkets/{market}":{"get":{"operationId":"dydx_get_v4_candles_perpetualmarkets_market","summary":"OHLCV candles for one perpetual market at a chosen resolution, optionally bounded by ISO timestamps.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"market","in":"path","required":true,"schema":{"type":"string"},"description":"Perpetual market ticker.","example":"BTC-USD"},{"name":"resolution","in":"query","required":true,"schema":{"type":"string","enum":["1MIN","5MINS","15MINS","30MINS","1HOUR","4HOURS","1DAY"]},"description":"Candle resolution.","example":"1HOUR"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Maximum number of candles to return.","example":2},{"name":"fromISO","in":"query","required":false,"schema":{"type":"string"},"description":"Start timestamp in ISO 8601 format.","example":"2026-11-28T10:20:26.000Z"},{"name":"toISO","in":"query","required":false,"schema":{"type":"string"},"description":"End timestamp in ISO 8601 format.","example":"2026-11-28T16:20:26.000Z"}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/historicalFunding/{market}":{"get":{"operationId":"dydx_get_v4_historicalfunding_market","summary":"Historical funding rates for one perpetual market, newest first, with the effective time and block height.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"market","in":"path","required":true,"schema":{"type":"string"},"description":"Perpetual market ticker.","example":"BTC-USD"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Maximum number of funding rows to return.","example":2},{"name":"effectiveBeforeOrAt","in":"query","required":false,"schema":{"type":"string"},"description":"Return rows effective at or before this ISO timestamp.","example":"2026-11-28T16:20:26.000Z"},{"name":"effectiveBeforeOrAtHeight","in":"query","required":false,"schema":{"type":"integer"},"description":"Return rows effective at or before this block height.","example":99999999}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/sparklines":{"get":{"operationId":"dydx_get_v4_sparklines","summary":"Sparkline price series for every perpetual market over the last day or seven days.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"timePeriod","in":"query","required":true,"schema":{"type":"string","enum":["ONE_DAY","SEVEN_DAYS"]},"description":"Sparkline window.","example":"ONE_DAY"}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/time":{"get":{"operationId":"dydx_get_v4_time","summary":"Current Indexer server time as an ISO string and epoch seconds.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/height":{"get":{"operationId":"dydx_get_v4_height","summary":"Current dYdX Chain block height and its UTC time.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/screen":{"get":{"operationId":"dydx_get_v4_screen","summary":"Compliance screening result for one address: whether the address is restricted and the reason, if any.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"dYdX or EVM address to screen.","example":"dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art"}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/compliance/screen/{address}":{"get":{"operationId":"dydx_get_v4_compliance_screen_address","summary":"Compliance screening detail for one address: status, reason and last update time.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"dYdX or EVM address to screen.","example":"dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art"}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/vault/v1/megavault/historicalPnl":{"get":{"operationId":"dydx_get_v4_vault_v1_megavault_historicalpnl","summary":"MegaVault historical PnL ticks at day or hour resolution.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"resolution","in":"query","required":true,"schema":{"type":"string","enum":["day","hour"]},"description":"PnL tick interval.","example":"day"}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/vault/v1/vaults/historicalPnl":{"get":{"operationId":"dydx_get_v4_vault_v1_vaults_historicalpnl","summary":"Historical PnL for every vault at day or hour resolution. Heavy: the response is several megabytes.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"resolution","in":"query","required":true,"schema":{"type":"string","enum":["day","hour"]},"description":"PnL tick interval.","example":"day"}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/vault/v1/megavault/positions":{"get":{"operationId":"dydx_get_v4_vault_v1_megavault_positions","summary":"Current MegaVault positions: market, side, size, entry price, realized and unrealized PnL.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}},"/run/dydx/v4/affiliates/snapshot":{"get":{"operationId":"dydx_get_v4_affiliates_snapshot","summary":"Affiliate leaderboard snapshot with referral codes, volume, and earnings.","tags":["dydx"],"security":[{"HubKey":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":100},"description":"Maximum affiliates to return.","example":5}],"responses":{"200":{"description":"Successful provider response in the OpenAPI Hub envelope.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ExecutionEnvelope"},{"type":"object","properties":{"data":{"type":"object","additionalProperties":true}}}]}}}},"400":{"description":"Invalid request body or parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"401":{"description":"Missing or invalid X-Hub-Key.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"404":{"description":"Source or executable route not found.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"429":{"description":"Hub admission or account quota limit reached.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"502":{"description":"Upstream provider or transport failure.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}},"503":{"description":"Key, control, or source state unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/HubError"},{"$ref":"#/components/schemas/ExecutionEnvelope"}]}}}}},"x-api-hub-provider":"dydx","x-api-hub-read-only":true,"x-api-hub-cost":{"model":"free","weight":0,"rate_limit_class":"standard"},"x-api-hub-billing-type":"free"}}},"components":{"securitySchemes":{"HubKey":{"type":"apiKey","in":"header","name":"X-Hub-Key","description":"Load from API_HUB_KEY; never place a key in a URL."}},"schemas":{"ExecutionEnvelope":{"type":"object","required":["source","path","status","data","cached","latency_ms"],"properties":{"source":{"type":"string"},"path":{"type":"string"},"params":{"type":"object","additionalProperties":true},"status":{"type":"integer"},"data":{},"cached":{"type":"boolean"},"ttl":{"type":"number"},"age_s":{"type":"number"},"latency_ms":{"type":"number"},"error":{"type":"string"}},"additionalProperties":true},"HubError":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"hint":{"type":"string"},"reason":{"type":"string","enum":["rate","client_concurrency","shared_concurrency","client_state_capacity"]},"retry_after_s":{"type":"integer","minimum":1},"source":{"type":"string"},"path":{"type":"string"},"method":{"type":"string"},"status":{"type":"integer"},"data":{},"cached":{"type":"boolean"},"latency_ms":{"type":"number"}},"additionalProperties":true}}},"tags":[{"name":"dydx","description":"dYdX Chain (v4) perpetual markets: tickers, L2 order books, candles, funding history, trades, vaults, positions and WebSocket streams."}]}