Questions tagged [python-bybit]

26 questions
14
votes
4 answers

ModuleNotFoundError: No module named 'jsonschema.compat'

I have been working with the Bybit API for the last week when I encountered the title problem yesterday. I have started a new env and installed only the bybit wrapper again and the issue still arises. From what I can see I have jsonschema installed…
Bjorgum
  • 2,054
  • 2
  • 4
  • 11
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
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
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
0
votes
0 answers

I am trying to make an auto trade on Bybit ccxt api but is not creating order

I would like the system able to help me get signal if -1 then short my order, 0 to not have any order , 1 to long my order. Here are some scenario i have. if i have long 0.5 and the signal is -1 now then it should be -1, as it needs to sell 0.5 to…
0
votes
0 answers

Trouble placing leveraged order using ccxt library with ByBit

I'm trying to place a market order using 75x leverage using futures derivates (ETH/USDT) on bybit with ccxt but it keeps producing the same error: An error occurred while placing the order: bybit {"retCode":140007,"retMsg":"remark:order[49649307…
Mack
  • 29
  • 3
0
votes
0 answers

Bybit CCXT - Take Profit by Percentage

I'm trying to setup a simple take profit percentage 1% above the entry price. I know how to code a successfully working defined "fixed price" take profit, where you state the 'actual take profit price', but what I want is to replace that with a…
0
votes
1 answer

pybit.exceptions.FailedRequestError: Http status code is not 200. (ErrCode: 404) (ErrTime: 07:32:08)

I have an issue with Python's Pybit module. I'm trying to get my wallet balance but I get the following error: pybit.exceptions.FailedRequestError: Http status code is not 200. (ErrCode: 404) (ErrTime: 07:32:08) My code: from pybit.unified_trading…
syrok
  • 65
  • 4
0
votes
1 answer

Why am I getting an error message about invalid symbols when I try to place an order on Bybit derivatives?

I am trying to place an order on Bybit usdt perpetual but I can't succeed. This is my script. client = HTTP(testnet = False, api_key=user_key, api_secret=secret_key) print(client.place_order( category="Linear", symbol="MANAUSDT", …
elya
  • 1
  • 1
0
votes
1 answer

Creating trading robot with Python and ByBit api

I am very new into programming with Python and running web applications,so wanted to make a little learn roadmap for my project with next requirements : 1.This bot should monitor my email box for emails from Trading View which will contain buy/sell…
0
votes
1 answer

InvalidRequestError when make order in pybit

I want to test some codes for placing short-open orders using pybit. My code is as follows. from pybit import * session = usdt_perpetual.HTTP(endpoint = "https://api-testnet.bybit.com", api_key = 'yyyyy', …
Gilseung Ahn
  • 2,598
  • 1
  • 4
  • 11
0
votes
0 answers

pybit subscribe to websocket for BTCUSD tickers

Does someone have an example of how to get the ticker information using pybit for the BTCUSD websocket feed, this is the futures markets? The documentation doesn't have an explicit example and am a bit lost. This is the Bybit documentation…
RonE
  • 1
0
votes
1 answer

Generate OHLC Prices of BTCUSDT Bysbit Spot using Python

I cannot generate the prices data. I thought the Interval = 60 maybe can be 1 hour interval. But the main problem is I cannot generate any data at all from pybit import spot import pandas as pd session = spot.HTTP( …
JECT
  • 1
0
votes
0 answers

'PYBIT' usdt_perpetual place order return price is different from the Market price

I use pybit to place a usdt_perpetual order at market price on the testnet, but the return data's price is different from the transaction price. info = session.place_active_order(side = "Buy" , symbol = "BTCUSDT" , order_type = "Market" ,…
Jason
  • 1
0
votes
0 answers

How to find the current market price of an asset using pybit?

Reading the pybit docs I am unable to find a way to obtain market price, specifically for BTC/USDT. How can I access this info? Read the docs, concluded market price could be contained in latest_information_for_symbol() but I don't know how to write…
Eli Bain
  • 23
  • 3
1
2