HTTP Example

The TX Stream API is a streaming service and does not expose a direct HTTP equivalent.

If you need real-time transaction monitoring, use the TX Stream gRPC service.

If you need transaction submission, use the main NextBlock HTTP, gRPC, or QUIC APIs instead.

Overview

Since the TX Stream API is gRPC-only, an HTTP-based trading bot integration usually looks like this:

  1. Use TX Stream gRPC for real-time monitoring

  2. Use the main HTTP API for transaction submission and tip floor monitoring

Recommendation

For trading bot applications that need fast transaction detection for sniping new DEX launches, the gRPC TX Stream API is strongly recommended due to its real-time streaming capabilities.

For trading bot transaction monitoring, use the TX Stream gRPC API with one of these examples:

There is currently no Python TX Stream example in this docs section.

HTTP API Integration

You can use the existing NextBlock HTTP API endpoints for transaction submission:

Available HTTP Endpoints

For transaction submission and tip floor data:

  • Frankfurt: https://frankfurt.nextblock.io

  • Amsterdam: https://amsterdam.nextblock.io

  • London: https://london.nextblock.io

  • Singapore: https://singapore.nextblock.io

  • Tokyo: https://tokyo.nextblock.io

  • New York: https://ny.nextblock.io

  • Salt Lake City: https://slc.nextblock.io

  • Dublin: https://dublin.nextblock.io

  • Vilnius: https://vilnius.nextblock.io

Best Practices

  1. Use TX Stream gRPC for real-time monitoring: this is the actual streaming interface

  2. Use HTTP, gRPC, or QUIC for submission: pick the main API transport that matches your needs

  3. Monitor tip floors: use the tip floor endpoint to optimize transaction tips

  4. Choose the closest endpoint: lower network latency generally improves performance

  5. Handle rate limits and retries: implement appropriate client-side error handling

Last updated