Developers

Get SFP trading schedule

Get the trading hours of stable funding perps (`_SFP` instruments).

On this page

URLs and generated code samples on this page: Testnet (chain ID 326). Other code on this page doesn't change: it stays on testnet until you switch it in your code. Tutorials, signing cases and live tools always use testnet.

SDKclient.get_sfp_trading_schedule(...)
HTTPPOST https://market-data.testnet.grvt.io/full/v1/sfp_trading_schedule, or /lite/v1/sfp_trading_schedule for lite names (the SDKs' default)
WebSocketmethod v1/sfp_trading_schedule on wss://market-data.testnet.grvt.io/ws/full, or /ws/lite for lite names
AuthNone (public)
RetriesRead: the SDKs retry retryable errors (rules)
Contract idsfp_trading_schedule.get_sfp_trading_schedule (RPCGetSfpTradingSchedule)

Request

Body type EmptyRequest. Fields the server fills are left out.

No fields.

Response

Body type ApiSfpTradingScheduleResponse (the same object is the JSON-RPC result over WebSocket).

  • update_timelite name utstring (int64)required#
    Session data update timestamp in milliseconds
  • equitylite name eobject SfpMarketScheduleoptional#
    Legacy: use schedules instead. Schedule for the EQUITY asset class
    2 fields of SfpMarketSchedule
    • sessionslite name sarray<TradingSession>required#
      Trading sessions for the current calendar week (Sunday to Saturday in the exchange's local time). The sessions are contiguous with no gaps, and any period when the market is not open, including holidays falling in this week, is returned as a CLOSE session
      3 fields of TradingSession
      • start_timelite name ststring (int64)required#
        Trading session start time timestamp in milliseconds
      • end_timelite name etstring (int64)required#
        Trading session end time timestamp in milliseconds
      • typelite name tenum TradingSessionTyperequired#
        Trading session type
        5 values
        REGULAR, PRE_MARKET, AFTER_MARKET, OVERNIGHT, CLOSE (details).
    • holidayslite name harray<TradingHolidaySchedule>required#
      Market holidays and early closes, past and upcoming, sorted by start time. The market is closed from the start time to the end time of each entry. Empty when there are none
      4 fields of TradingHolidaySchedule
      • namelite name nstringrequired#
        Holiday name
      • close_typelite name ctenum TradingScheduleCloseTyperequired#
        FULL_DAY: the market is closed for the whole day. EARLY_CLOSE: the market trades as normal until the start time, then is closed until the end time
        2 values
        FULL_DAY, EARLY_CLOSE (details).
      • start_timelite name ststring (int64)required#
        When the closure begins, as a Unix timestamp in milliseconds. For FULL_DAY this is when the closed trading day's session would have opened (the evening before for a session that opens before midnight); for EARLY_CLOSE it is the moment the market closes early
      • end_timelite name etstring (int64)required#
        When the closed or shortened trading day's session would have closed, as a Unix timestamp in milliseconds. The closure covers the start time up to, but not including, the end time
  • equity_nyselite name enobject SfpMarketScheduleoptional#
    Legacy: use schedules instead. Schedule for the EQUITY_NYSE asset class Fields: same as equity above.
  • equity_nasdaqlite name en1object SfpMarketScheduleoptional#
    Legacy: use schedules instead. Schedule for the EQUITY_NASDAQ asset class Fields: same as equity above.
  • commoditylite name cobject SfpMarketScheduleoptional#
    Legacy: use schedules instead. Schedule for the COMMODITY asset class Fields: same as equity above.
  • commodity_cmelite name ccobject SfpMarketScheduleoptional#
    Legacy: use schedules instead. Schedule for the COMMODITY_CME asset class Fields: same as equity above.
  • scheduleslite name sarray<SfpTradingScheduleGroup>required#
    Trading hours, as groups of stable funding perps that share them: one group per asset class, named after it, then one per instrument schedule, named by the exchange. Each stable funding perp with a schedule is in exactly one group.
    5 fields of SfpTradingScheduleGroup
    • namelite name nstringrequired#
      The group name. For stable perps on their asset class hours, the asset class (for example COMMODITY_CME)
    • asset_classlite name acenum AssetClassrequired#
      The instruments' asset class. Its holiday calendar sets the group's holidays
      10 values
      CRYPTO, EQUITY, COMMODITY, FX, INDEX, EQUITY_NASDAQ, EQUITY_NYSE, EQUITY_KRX, COMMODITY_CME, PRE_IPO (details).
    • instrumentslite name iarray<string (instrument name)>required#
      The stable perps trading these hours, sorted. Each stable perp with a schedule is in exactly one group
    • sessionslite name sarray<TradingSession>required#
      Trading sessions for the current calendar week (Sunday to Saturday in the exchange's local time). The sessions are contiguous with no gaps, and any period when the market is not open, including holidays falling in this week, is returned as a CLOSE session Fields: same as equity.sessions[] above.
    • holidayslite name harray<TradingHolidaySchedule>required#
      Market holidays and early closes, past and upcoming, sorted by start time. The market is closed from the start time to the end time of each entry. Empty when there are none Fields: same as equity.holidays[] above.

Errors

Errors come back as {"code", "message", "status"} (lite {"c", "m", "s"}) with the HTTP status. Codes this call can return (all error codes):

3 errors any call can return; none specific to this one
1002InternalServer500
Internal Server Error
1003InvalidRequest400
Request could not be processed due to malformed syntax
1006RateLimit429retryable
You have surpassed the allocated rate limit for your tier

Example

Example code
from grvt import Grvt

with Grvt(env="testnet") as client:
    resp = client.get_sfp_trading_schedule()
    print(resp)

Raw HTTP (set GRVT_DOMAIN, see Environments):

With full field names:

curl -sS "https://market-data.testnet.grvt.io/full/v1/sfp_trading_schedule" \
  -H "Content-Type: application/json" \
  --data '{}'

With lite field names:

curl -sS "https://market-data.testnet.grvt.io/lite/v1/sfp_trading_schedule" \
  -H "Content-Type: application/json" \
  --data '{}'
Run on testnet
esc

↑ ↓ move↵ open⇧↵ open .mdTry an error code like 2002

Keyboard shortcuts

⌘ K
Search the docs
/
Search
l
Next code language (Python → TypeScript → Go → Rust → curl → WebSocket)
j / k
Next / previous page
t
Light / dark theme
?
This help
Esc
Close dialogs and drawers