Skip to main content
HomeIntegrationsWebhook → Bybit
Custom webhook to Bybit integration guide

Webhook to Bybit — automate crypto orders from your own code

To send a webhook to Bybit, POST a flat JSON payload to your unique PipSync webhook URL: PipSync validates the secret token, maps the fields to a Bybit derivatives order and places it on your Unified Trading Account 24/7 — using a trade-only API key with withdrawals disabled, so your code never touches your private keys directly.

Start your 14-day free trialSee pricing

14-day trial on every plan · Cancel any time before it ends

Risk warning: Trading CFDs and other leveraged products is complex and carries a high risk of losing money rapidly because of leverage. Industry data indicates that 70–80% of retail trading accounts lose money on these products. Risk disclosure · Past performance.

This route is source-agnostic: any system that can make an HTTPS POST — a Python script, a backtesting bot, a serverless function or a no-code automation — can drive Bybit through the same JSON contract. PipSync runs the execution layer in the cloud with server-side risk controls, reduce-only closes and signed outbound webhooks for feedback, so you keep your own strategy logic while offloading order routing, retries and account safety.

Webhook to Bybit at a glance

SourceAny system that can HTTPS POST flat JSON (scripts, bots, serverless, no-code)
DestinationBybit crypto derivatives (USDT/USDC perpetuals) on the Unified Trading Account
PayloadFlat JSON: action, symbol, optional price/sl/tp/lots/comment; action "close" flattens the position
API keyYour own trade-only Bybit key, withdrawals disabled; never used for transfers
Order safetyReduce-only closes plus server-side sizing, SL/TP mapping and max-open-trades limits
FeedbackSigned outbound webhooks (HMAC-SHA256) plus REST read API; per-minute inbound rate limit, 429 returns Retry-After
Price14-day free trial on every plan (card required); paid plans from USD 24/month

How do I connect a webhook to Bybit?

Wire your own code or automation to Bybit through PipSync in about ten minutes. You provide a trade-only API key; PipSync gives you a tokenised webhook URL and handles execution.

  1. Create your PipSync account and start the trial

    Sign up at app.pipsync.io and start the 14-day free trial (payment method required), so you can build and test the integration before the first charge.

  2. Create a trade-only Bybit API key

    In Bybit, generate an API key scoped to trading on your Unified Trading Account with withdrawals disabled. Paste the key and secret into PipSync; they are stored server-side and never returned to your code.

  3. Add a custom webhook source

    In PipSync, create a custom JSON webhook source. PipSync issues a unique URL whose secret token is the credential — keep it private and rotate it from the dashboard if it ever leaks.

  4. Configure server-side risk rules

    Set fixed-lot or percent-risk sizing, SL/TP mapping, symbol filters and max open trades. These run before any order reaches Bybit, so the same limits apply even when your machine is off.

  5. POST your first JSON payload

    From your script or automation, send a flat JSON body with action, symbol and optional price, sl, tp, lots and comment to the webhook URL. Match Bybit's exact symbol name; use action "close" to flatten an open position.

  6. Verify in Test Mode, then go live

    Enable Test Mode to confirm PipSync interprets your payloads correctly without executing, then disable it and run a small live order to confirm end-to-end fills before scaling up.

Typical setup time: about 11 minutes.

What does the JSON payload for a Bybit webhook look like?

The payload is a single flat JSON object — no nesting — that maps directly to a Bybit derivatives order. The core field is action ("buy", "sell" or "close"), followed by symbol, which must match Bybit's exact contract name. Optional fields let you control price and risk precisely.

Prices are absolute values, and a 0 means "omit" — set price to 0 for a market order, or sl and tp to 0 to leave them off. The lots field overrides your configured sizing for that one trade, so omit it when you want PipSync's server-side sizing to run instead.

  • action: "buy", "sell", or "close" (close flattens the open position on that symbol)
  • symbol: the exact Bybit contract name (e.g. a USDT perpetual)
  • price: absolute entry price, or 0 for a market order
  • sl / tp: absolute stop-loss and take-profit prices, or 0 to omit
  • lots: optional size that overrides configured sizing; omit to use server-side sizing
  • comment: optional free-text label carried with the order

Why use a trade-only API key for Bybit?

A trade-only API key lets PipSync place and manage orders on your Unified Trading Account without ever being able to move funds off the exchange. You create the key in Bybit with withdrawals disabled, so even if the credential were exposed it could not initiate a transfer.

Your own code never has to embed Bybit keys either — you POST to a PipSync webhook URL whose secret token is the only credential your scripts hold. PipSync stores the exchange key server-side, separating your strategy code from your account access.

How does PipSync close or reduce a Bybit position?

Sending action "close" in your payload flattens the open position on that symbol. PipSync submits the close as a reduce-only order, so it can only shrink or flatten an existing position and will not accidentally open a new one in the opposite direction.

This matters on the Unified Trading Account, where unified margin and perpetuals make exposure easy to flip. Reduce-only closes give you a deterministic way to exit from your code without second-guessing whether a fill reversed your position.

How do I get execution feedback from Bybit trades?

PipSync gives you three feedback channels so your system always knows what happened. Signed outbound webhooks fire on trade.opened, trade.closed, tp_hit and sl_hit events, each carrying an HMAC-SHA256 signature in the X-PipSync-Signature header and retried up to five times with backoff. A REST read API (GET /v1/signals and GET /v1/trades, documented via OpenAPI 3.1) lets you poll state on demand, and the dashboard shows every parsed signal and order on all plans.

Inbound webhooks are rate-limited per minute, scaling by plan from the entry tier up to custom limits on Enterprise. If you exceed the limit you get a 429 with a Retry-After header — back off with jitter and your bursts will settle cleanly. The read API is part of the Enterprise plan.

Does the Bybit route run 24/7 without a server of my own?

Yes. PipSync's Bybit route is fully cloud-based and runs 24/7, which matches crypto markets that never close. There is no VPS, no plugin and no terminal to keep open — once your webhook source and trade-only key are configured, execution continues whether your laptop is on or off.

Because the route is source-agnostic, the same setup works for a cron-driven script, a hosted bot or an event-driven function. Your job is to POST valid JSON; PipSync handles authentication, order routing, retries and the server-side risk checks.

Try the full product for 14 days

Connect a signal source and a broker account, watch PipSync parse and route in real time, and decide before day 14. Every plan starts with a 14-day free trial — payment method required, cancel any time, from $24/month after.

14-day trial on every plan · Cancel any time before it ends

Risk warning: Trading CFDs and other leveraged products is complex and carries a high risk of losing money rapidly because of leverage. Industry data indicates that 70–80% of retail trading accounts lose money on these products. Risk disclosure · Past performance.

FAQ

Frequently asked questions

Calling the Bybit API directly means your own code handles authentication, signing, retries, rate limits and error handling. A webhook to Bybit through PipSync lets you POST a simple flat JSON payload while PipSync manages the exchange connection, applies server-side risk controls and sends signed feedback events. Your scripts hold only a webhook token, not your Bybit keys.

Written by the PipSync team · Reviewed by PipSync Editorial, Editorial team · Published · Last updated

PipSync is a cloud-based signal automation platform that routes trading signals from Telegram, Discord, TradingView alerts and custom webhooks to broker accounts on MetaTrader 4, MetaTrader 5, cTrader, Match-Trader, Binance Futures and Bybit — with server-side risk management and no VPS required. PipSync is an execution tool, not a signal provider and not investment advice.

PipSync is a signal execution tool. It does not provide trading signals, does not guarantee any trading results and is not investment advice. Trading leveraged products involves substantial risk of loss. See the full risk disclosure and performance disclaimer.