simple_trading_bot

command
v0.6.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Deriv Binary Options Trading Bot

This Go script demonstrates how to use the Deriv API to create a simple trading bot for binary options. The script uses the deriv-api and deriv-api/schema packages to interact with the Deriv API and send requests to create a new proposal and buy a binary option.

To use this script, you will need to replace the ApiToken constant with your own API token. You can obtain an API token by logging in to your Deriv account and generating a new token in the API tokens section.

The script first creates a new DerivAPI instance and authorizes the connection using the provided API token. It then creates a new proposal request with a specified amount, barrier, duration, basis, contract type, currency, and symbol.

The script then sends the proposal request to the Deriv API and waits for a response. Once a proposal is received, the script creates a new buy request with the proposal ID and a specified price.

The script then subscribes to the buy request and waits for a response. Once the binary option is bought, the script logs the current spot and the contract result.

Note that this script is provided as an example and may require modifications to work with your specific environment and use case. It is important to thoroughly test any trading bot before using it with real funds.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL