Skip to content

Commit

Permalink
add margin trading topic doc
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jan 23, 2025
1 parent 0e13ced commit a6d88b4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ the implementation.
## Supported Exchanges

- Binance Spot Exchange (and binance.us)
- OKEx Spot Exchange
- OKX Spot Exchange (previous OKEX)
- Kucoin Spot Exchange
- MAX Spot Exchange (located in Taiwan)
- Bitget Exchange
Expand All @@ -142,7 +142,7 @@ the implementation.

## Requirements

* Go SDK 1.20
* Go SDK 1.22

* Linux / MacOS / Windows (WSL)

Expand Down
20 changes: 20 additions & 0 deletions doc/topics/margin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Margin Trading

Margin trading is a method of trading assets using funds provided by a third party. When compared to regular trading accounts, margin accounts allow traders to access greater sums of capital, allowing them to leverage their positions. Essentially, margin trading amplifies trading results so that traders are able to realize larger profits on successful trades. This ability to expand trading results makes margin trading especially popular in low-volatility markets, particularly the international Forex market. Nonetheless, it is important to note that margin trading involves a significant amount of risk. While you can use leverage to make a greater profit, you can also incur significant losses if a trade moves against you.

Currently, bbgo supports cross margin trading and isolated margin trading. Enable margin trading by setting the `margin` field under the session settings in the bbgo.yaml configuration file, for example:

```yaml
sessions:
binance:
exchange: binance
envVarPrefix: BINANCE
margin: true
```
## Margin Trading on OKX
To enable margin trading on OKX, you need to set the trading mode to "Spot Mode",
and turn on Auto-Borrow from the OKX UI.

0 comments on commit a6d88b4

Please sign in to comment.