c9s / bbgo

The modern cryptocurrency trading bot framework written in Go.
https://bbgo.finance
GNU Affero General Public License v3.0
1.16k stars 276 forks source link

FEATURE: close short positions with ClosePosition #1597

Closed Newtoniano closed 4 months ago

Newtoniano commented 4 months ago

This PR adds the ability to close short positions with the ClosePosition method. It adjusts the order quantity based on the available quote balance and the current ask price for the symbol.

bbgokarma-bot commented 4 months ago

Hi @Newtoniano,

This is KarmaBot, and we reward your contributions with tokens sent directly to your wallet to support development.

This pull request may get 209 BBG.

To receive BBG tokens, please provide your Polygon (can be Ethereum) address as an issue comment in this pull request, following this format:

polygon:0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B

Once this pull request is merged, your BBG tokens will be transferred to your wallet.

-- If you're interested in our project, feel free to join our Telegram group https://t.me/bbgo_intl

Best, KarmaBot

CLAassistant commented 4 months ago

CLA assistant check
All committers have signed the CLA.