amandris / arbitrage-trading-bot

Bot to automate trading orders between Bitcoin exchanges to make some profit.
MIT License
42 stars 34 forks source link

OKCOIN response Gone #18

Open Sascha321 opened 3 years ago

Sascha321 commented 3 years ago

Hello, when I enter the command "bin / console bot: trade" in the console, I get the following error message,

"Client error: `GET https://www.okcoin.com/api/v1/ticker.do?symbol=btc_usd`   
  resulted in a `410 Gone` response:                                           
  Gone   
"

, can you help me?

Sascha321 commented 3 years ago

Hello, I have a ubuntu 18.04 desktop version on which I install your software as follows, see attachment (Ubuntu.txt). These installations are also error-free. But as soon as I enter the composer install command I get the error as can be seen in the appendix (Fehler.txt, Airbitrade.jpg). Can someone help me there?

arbitrage fehler.txt ubuntu.txt

commonpike commented 3 years ago

About your first question, you get '410 Gone' because the OKCoin API V1 is gone :-)

The API is at v3 now, and the request for the ticker should be at https://www.okcoin.com/api/spot/v3/instruments/BTC-USDT/ticker. (I think)

The code that calls it is in the src/AppBundle/Service/OkcoinService.php but needs to be rewritten a bit, since $responseJson->ticker->buy and $responseJson->ticker->sell dont exist in the new api. There is ask and bid now, but I'm not sure what it means.