Systematic Binance Trading

Discussion in 'Journals' started by Sekiyo, Dec 14, 2024.

  1. Sekiyo

    Sekiyo

    Nothing's going on.
    Just added some more money.

    Usually I buy the tops :D
    Crypto ... equities.

    upload_2024-12-19_17-29-31.png
     
    #21     Dec 19, 2024
  2. Sekiyo

    Sekiyo

    2024-12-20 13:55:29,091 - INFO - Top Performer: TROYUSDT, Best Performance: 2.5558005429598385, Percent Positive Metric: 0.06628242074927954

    Percent Positive Metric has to be at least 0.25 for the system to take a ~5% (0.25^2) exposure position.

    Min notional is 5$ per order on binance.

    I use daily data but fetch every 5min (lol).

    One thing to monitor manually are delistings,
    Need to exclude them from the universe,
    Otherwise I might hold a delisted coin.
    Did happen during backtests ^^

    Added 3 coins to the “blacklist” yesterday.

    Not sure if Binance provides this info via their API.
     
    Last edited: Dec 20, 2024
    #22     Dec 20, 2024
  3. Sekiyo

    Sekiyo

    I have tried to backtest by splitting account value in half (1/N) and allocating to top 2 but results are worse.

    I have tried to use EMAs slope (10, 20, 50, 200) but it doesn't beat mean(pct_change).

    After searching online and through their API documentation.
    They don't provide a way to gather upcoming delisting information.
    Only way would be to scrap for symbols on their announcement page.

    Still nothing's going on
    upload_2024-12-20_21-3-7.png

    Oh boy it's going to be harder than expected.
    Can't fetch the URL directly as it's not a static page.
    Got to make a call to their api such as ..

    https://www.binance.com/bapi/apex/v1/public/apex/cms/article/list/query?type=1&pageNo=1&pageSize=50

    But it returns ...

    ERROR: The request could not be satisfied
    403 ERROR
    Request blocked.
    We can't connect to the server for this app or website at this time.
    There might be too much traffic or a configuration error.
    Try again later, or contact the app or website owner.

    Guess I need to simulate a chrome header as it works by clicking on the link.
     
    Last edited: Dec 20, 2024
    #23     Dec 20, 2024
  4. Works fine in straight curl, no headers:

    curl 'https://www.binance.com/bapi/apex/v1/public/apex/cms/article/list/query?type=1&pageNo=1&pageSize=50' --compressed

    May be that they've flagged your ip. Try connecting through proxy.
     
    #24     Dec 20, 2024
    Sekiyo likes this.
  5. Sekiyo

    Sekiyo

    Thank you for the feedback !

    From my VPS, I’ve tried with curl, python and selenium (chromeDriver) and got a 403 error. But I still fetch their public api, to run the algorithm, every 5min with success.

    Didn’t add the —compressed flag though.

    Might try to use a proxy.

    Thanks.
     
    Last edited: Dec 20, 2024
    #25     Dec 20, 2024
  6. Sekiyo

    Sekiyo

    I don't know I even tried with tor, free proxy and free trials.

    Failed to retrieve data. Status code: 403

    I'll see tomorrow.

    curl --proxy socks5h://localhost:9050 "https://www.binance.com/bapi/apex/v1/public/apex/cms/article/list/query?type=1&pageNo=1&pageSize=50"

    </div>
    _<div class="forbidden-text-wrap">
    __<div class="forbidden-text-wrap-cn">
    ___根据相关要求,平台不支持通过洋葱浏览器进行访问,请您使用其他浏览器进行访
    __</div>
    __<div class="forbidden-text-wrap-en">
    ___It appears that you are trying to access Binance from an unsupported browser.
    ___Please use a different browser.
    __</div>
    _</div>
    </div>
     
    Last edited: Dec 20, 2024
    #26     Dec 20, 2024
  7. Sekiyo

    Sekiyo

    I’ve made a profit ! xD

    IMG_1704.jpeg
     
    #27     Dec 21, 2024
  8. Sekiyo

    Sekiyo

    Well nothing's going on.
    Allocated at about 10% because market is shit.
    I have removed the squared allocation. Linearly allocated.

    I'll post once a week because on a day to day ...
    It's boring. Especially right now.

    upload_2024-12-22_15-53-23.png

    upload_2024-12-22_16-16-28.png
     
    Last edited: Dec 22, 2024
    #28     Dec 22, 2024
  9. Sekiyo

    Sekiyo

    IMG_1706.jpeg

    The algorithm’s trying to buy ZECUSDT but binance flagged it “monitoring” because of higher volatility than usual.

    Tried manually but they say I don’t have the privileges.

    Okkaaayyyy
     
    #29     Dec 23, 2024
  10. Sekiyo

    Sekiyo

    IMG_1707.jpeg

    Went full USUAL manually.
    System doesn’t take it into account,
    Because it doesn’t have enough history.

    But it’s a solid candidate with a nice entry.
     
    #30     Dec 23, 2024