Questions tagged [bybit]

58 questions
5
votes
1 answer

How can I closing my position with using Market order via Bybit API?

I try creating a sample trading bot using python with Bybit API. it is working when I creating position but when I trying close the position it sending me error because when i closing position I cannot using "Market" order. I am searching on Bybit…
Turing
  • 124
  • 1
  • 7
2
votes
1 answer

Cannot subscribe WebSocket for inverse contract in ByBit unified v3 API

I'm trying to use ByBit derivatives v3 API to subscribe public market data from WebSocket. I first query instruments of inverse contract BTCUSD through /derivatives/v3/public/instruments-info, and I got this: { "symbol": "BTCUSD", …
Xiang Zhang
  • 2,831
  • 20
  • 40
2
votes
3 answers

Bybit API Python Invalid API key

I was trying to create a Bybit Trading bot and when I started testing it it stopped working and it keeps throwing the same error(10003) Invalid API key. I have checked it several times and it was correct. Do you know what can be the reason for that?
2
votes
4 answers

Sign error for bybit using c# when sending post request

I am trying to send a simple post request to the bybit api and I keep getting the 10004 sign error. Here is the response: {"ret_code":10004,"ret_msg":"error sign! origin_string[api_key=(my api…
Vexatious
  • 21
  • 1
  • 2
1
vote
0 answers

How to Set Trailing Stop Loss? [Bybit API]

I want to set a trailing stop loss for my "LONG" position. For example; Can you show me how to make a trailing stoploss on USDT-M so that when the last price goes 10% above my entry price, it will follow the last price by 5%? Thanks. I tried to do…
1
vote
0 answers

How can I place a market or limit spot order using pybit/bybit?

Here is some code that is working. However I cant confirm that the stop loss and take profits are being placed. I can see my buy order on bybit through the trading view, but nothing to indicate there is a tp or sl. Could someone please provide some…
Jon Cianci
  • 61
  • 1
  • 8
1
vote
1 answer

Bybit API InvalidRequestError: Missing required parameter 'type'

I get the above error when trying to execute an order through pybit. Reading the docs I'm not aware of a parameter called "type" or what it refers to. Does anyone know what I need to do to my code to execute an order? …
Eli Bain
  • 23
  • 3
1
vote
0 answers

CCXT Bybit, Cannot create order in One-Way Mode

The below script works fine in "Hedge Mode". However, if I change the Position Mode to "One-Way Mode", I got an error, "position idx not match position mode". I've googled for a while and still cannot find the solution, please kindly help,…
1
vote
2 answers

Filter the response from Websocket connection

I am attempting to filter the information from a websocket request. I can complete my request fine however the response comes back with more information than I actually require. I want to filter this information out and then use it in a…
james
  • 13
  • 3
1
vote
1 answer

ByBit : API ColdFusion

Having trouble with ByBit By/Sell API. ColdFusion any help appreciated. https://bybit-exchange.github.io/docs/spot/v3/?console#t-authenticationparameters Authentication for POST POST rule: timestamp + api_key + recv_window +…
Merle_the_Pearl
  • 1,391
  • 3
  • 18
  • 25
1
vote
1 answer

Bybit api connection "retCode":10004,"retMsg":"error sign!"

According to official documentation https://bybit-exchange.github.io/docs/derivativesV3/unified_margin/#t-constructingtherequest I try to get account balance endpoint: GET /unified/v3/private/account/wallet/balance. But anyway I get this response:…
Radikulit
  • 48
  • 1
  • 7
1
vote
2 answers

Create market order on Bybit using CCXT with SL and TP using python?

Does anyone have an example of how to create a market order with take profit and stop loss? I have been through the docs and because this is the first time i've done anything like this I don't really get it! I have everything working except for…
maxixmo
  • 45
  • 1
  • 6
1
vote
1 answer

ByBit API: is there a way to ensure stop loss order will be executed as "limit"

I am coding up a python bot that helps for scalping. One of my functions, is that once a button is clicked a stop loss 0.04% below the market price will automatically be placed. However due to the closeness of the stop loss, it often gets executed…
1
vote
2 answers

How to build a simple Websocket in Python for ByBit and fetch the values in variables?

First of all, I'm not a programmer, but a trader. Years ago I had some java training at school, so I understand the code and can build some little thing by copy&paste. I managed to get data from the websocket in a Python script. I need a small…
Osman
  • 81
  • 2
  • 7
1
vote
2 answers

ByBit Exchange Spot Conditional Order

I'm trying to place a conditional order using pybit The purpose is to sell my current spot. The code is taken from the example from official website: from pybit import HTTP session = HTTP("https://api.bybit.com", api_key= apikey,…
sealpuppy
  • 615
  • 4
  • 12
  • 27
1
2 3 4