Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Send trade events to API/webhook for execution

    General Discussion
    2
    2
    527
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      nomad5am last edited by nomad5am

      Hi guys,
      I've got a question regarding the execution of trades. We are running our own bot for bitmex and we would like to send the trades from Backtrader to our Bot API/Webhook instead of the broker. Our bot will then handle the order execution.

      Backtrader >(local network API/Webhook )> Our Bot > Exchange

      Anyone tried this and could help me out? Is there anything in Backtrader that can be used for this?
      I would appreciate your input :)

      Have a great day!
      Cheers

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        @nomad5am said in Send trade events to API/webhook for execution:

        we would like to send the trades from Backtrader to our Bot API/Webhook instead of the broker

        You have missed how things work. A Broker in backtrader is simply an interface to something. The default broker is meant for backtesting, but this can be replaced by other brokers, which ma interface to API, Webhooks or to whatever you want.

        This is what the integrated brokers for Oanda (v1API), Interactive Brokers´ and VisualChart do. An example of an independently developed broker (Oanda` (v2API))

        • https://github.com/ftomassetti/backtrader-oandav20

        For examples of how to change brokers

        • Docs - Interactive Brokers

        The Cerebro reference

        • Docs - Cerebro
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors