PERPETUAL FUTURES24/7 crypto, index and commodity perps
Featured Firm VestVest 5% OFF all plans · from $10 · NQ 50x · no swap fee · USDC payouts on-chain 5% Off Code JMU

RULE CHANGE

Rule Radar

Market data streaming

My Funded Perpetuals changed this help center article on October 25, 2026. Updated Stricter

Removed SDK price streams section with code examples for all six supported programming languages and lifecycle event documentation.


What this means

The article no longer documents PriceStream clients across TypeScript, Python, Go, Rust, Java, and PHP, including connection examples, lifecycle notices (subscribed, snapshot_end, draining), error handling, retry policies, buffering limits (16 messages, 1 MiB), and session management. The "Market identity and filters" section remains.

▸ View exact changes
The change in place, line by line
This minimal example shows framing. Add the reconnection and recovery handling
below before using it in a long-running client.
− SDK price streams
− All six MyFundedPerps SDKs provide a PriceStream client for the ticks
− channel. The TypeScript SDK is available on npm; the other SDKs are maintained
− in the project repository. Python streaming uses the optional
− streaming extra; PHP requires Composer dependencies. TypeScript uses native
− WebSocket support in browsers, Bun, or Node 22+.
− Each session subscribes to 1–32 exact symbols on one connection. Prices remain
− decimal strings. Specify providers to avoid mixing prices from different venues.
− No API key is accepted or sent by these streaming clients.
− TypeScript
− sh theme={null}
− npm install @myfundedperps/sdk
− ts theme={null}
− import { PriceStream } from "@myfundedperps/sdk";
− const stream = new PriceStream({
− symbols: ["BTCUSDT", "ETHUSDT"],
− providers: ["binance"],
− });
− try {
− for await (const event of stream) {
− if (event.type === "tick") {
− console.log(event.symbol, event.kind, event.price);
− }
− }
− } finally {
− stream.close();
− }
− Python
− python theme={null}
− from myfundedperps import PriceStream
− with PriceStream(["BTCUSDT", "ETHUSDT"], providers=["binance"]) as stream:
− for event in stream:
− if event["type"] == "tick":
− print(event["symbol"], event["kind"], event["price"])
− Go
− go theme={null}
− import (
− "context"
− "fmt"
− "github.com/MyFundedPerps/myfundedperps/sdk/go"
− )
− func readPrices(ctx context.Context) error {
− stream, err := myfundedperps.DialPriceStream(ctx, myfundedperps.PriceStreamConfig{
− Symbols: []string{"BTCUSDT", "ETHUSDT"},
− Providers: []string{"binance"},
− })
− if err != nil {
− return err
− }
− defer stream.Close()
− for {
− event, err := stream.Next()
− if err != nil {
− return err
− }
− if event.Tick != nil {
− fmt.Println(event.Tick.Symbol, event.Tick.Kind, event.Tick.Price)
− }
− }
− }
− Rust
− rust theme={null}
− use myfundedperps::{PriceStream, PriceStreamError, PriceStreamEvent};
− fn main() -> Result<(), PriceStreamError> {
− let stream = PriceStream::connect(
− &["BTCUSDT", "ETHUSDT"], Some(&["binance"]),
− )?;
− for event in stream {
− if let PriceStreamEvent::Tick(tick) = event? {
− println!("{} {:?} {}", tick.symbol, tick.kind, tick.price);
− }
− }
− Ok(())
− } // Dropping the stream closes the connection.
− Java
− java theme={null}
− import com.myfundedperps.sdk.PriceStream;
− import com.myfundedperps.sdk.PriceStreamEvent;
− import java.util.List;
− try (PriceStream stream = PriceStream.connect(
− List.of("BTCUSDT", "ETHUSDT"), List.of("binance"))) {
− PriceStreamEvent event;
− while ((event = stream.next()) != null) {
− if (event.tick != null) {
− System.out.println(event.tick.symbol + " " + event.tick.kind + " " + event.tick.price);
− }
− }
− }
− PHP
− php theme={null}
− require 'vendor/autoload.php';
− use MyFundedPerps\Sdk\PriceStream;
− $stream = new PriceStream(['BTCUSDT', 'ETHUSDT'], ['binance']);
− try {
− foreach ($stream as $event) {
− if ($event->tick !== null) {
− echo $event->tick->symbol . ' ' . $event->tick->kind . ' ' . $event->tick->price . PHP_EOL;
− }
− }
− } finally {
− $stream->close();
− }
− The examples print ticks. Applications should also handle lifecycle notices:
−
NoticeMeaning
subscribedThe server accepted the filter. snapshotBoundary says whether to expect a snapshot boundary.
snapshot_endThe initial retained snapshot is complete.
drainingEstablish a replacement session and wait for its snapshot, then close the old session. The old session remains readable.
− Rust names these variants Subscribed, SnapshotEnd, and Draining.
− Snapshot events can repeat observations; do not assume exactly-once delivery.
− mark, mid, and last ticks are distinct price observations.
− The SDKs expose session failures rather than reconnecting automatically.
− Transport failures and server-end frames produce a stream error with
− retryable = true. Use a bounded retry policy with exponential backoff and
− jitter. Subscription rejections preserve the server's error details and are
− not marked retryable. Fix rejected filters before retrying. Continue to check
− tick timestamps for market freshness even while the socket is connected.
− Keep one reader per session. Always close the stream when finished.
− TypeScript accepts an AbortSignal; Go follows the dial context; Python and
− Java allow another thread to close a blocked reader; Rust provides a
− close_handle(); PHP accepts an Amp\Cancellation.
− Receive buffering is bounded. Pull transports apply backpressure; TypeScript
− and Java fail with slow_consumer if more than 16 complete messages await the
− reader. Messages over 1 MiB fail the session. No client silently truncates a
− batch or rounds a decimal price. Other market channels remain available
− through the wire protocol below; the SDK wrapper currently covers price ticks.
Market identity and filters
Use the exact coin and provider returned for your selected market by

Every My Funded Perpetuals changeRule Radar: all firms

Scroll to Top