A discord bot that manages your server's hedge fund

Overview

Can't Hide Money Bot

test-status

A discord bot that manages your server's hedge fund

wu_tang_financial

Installing

Install wkhtmltopdf

sudo apt-get install wkhtmltopdf
OR
brew install wkhtmltopdf
pip install -U git+https://github.com/kelvinabrokwa/cant-hide-money-bot.git

Create an env file like:

DISCORD_TOKEN='XXX'
DEV_GUILD_ID='XXX'

Running

# Server
python -m cant_hide_money_bot.server --mode dev

# One-off report
python -m cant_hide_money_bot.report --mode dev

Testing

make test
make lint

About the app

Currently, we store the portfolio as a big list of trades like:

class Trade:
    symbol: Symbol
    dir_: Dir
    qty: Qty
    time: datetime
    price: float
    trader: Trader
    guild: str

An empty portfolio has 0 USD and no positions. When you do a BUY trade, you get shorter USD and longer the security. When you do a SELL trade, you get longer USD and shorter the security. Note that we capture market prices at execution time in Trade to be able to calculate the value of the portfolio later.

The Bot

On Discord

!help
~if you ain't talkin money i ain't talkin~

​No Category:
  $                Print portfolios per trader
  $$               Print portfolio for entire fund
  BUY              Buy some shares
  IM-FEELING-LUCKY Buy or sell a random quantity of a random symbol
  SELL             Sell some shares
  T                Print all trades made in this fund
  help             Shows this message

Type !help command for more info on a command.
You can also type !help category for more info on a category.

Useful queries

select symbol, sum(qty * (case when dir == 'BUY' then 1 else -1 end)) from trades where trader = '<trader>' group by symbol;
You might also like...
Discord bot to administer IITD Study Servers (unofficial)

IITD-Bot Discord bot to administer IITD'20 Acad Server Commands hello to check if bot is online ?help to display this message ?set kerberos to set y

A discord bot for tracking Iranian Minecraft servers and showing the statistics of them

A discord bot for tracking Iranian Minecraft servers and showing the statistics of them

A self-bot for discord, written in Python, which will send you notifications to your desktop if it detects an intruder on your discord server

A self-bot for discord, written in Python, which will send you notifications to your desktop if it detects an intruder on your discord server

πŸ’€ The first raid tool of its kind. Inject Deadcord and raid servers directly from the Discord client.
πŸ’€ The first raid tool of its kind. Inject Deadcord and raid servers directly from the Discord client.

πŸ’€ Deadcord The next upcoming Discord raid tool, the best for free. πŸŽ‰ Early Beta Released We have released an early version of Deadcord, please keep

PyManGenerator is a token generator for discord, it joins servers using webbot to automate everything

PyManGenerator is a token generator for discord, it joins servers using webbot to automate everything. Captcha can be done by itself unless you used your current IP Address more than once.

Find rare users in discord servers

BadgeScraper Find rare users in discord servers How to use Replace the guild_id, server_id and token by the values you wanna use If you never used dis

Administration Panel for Control FiveM Servers From Discord
Administration Panel for Control FiveM Servers From Discord

FiveM Discord Administration Panel Version 1.0.0 If you would like to report an issue or request a feature. Join our Discord or create an issue. Contr

A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Discord bot script for sending multiple media files to a discord channel according to discord limitations.

Discord Bulk Image Sending Bot Send bulk images to Discord channel. This is a bot script that will allow you to send multiple images to Discord channe

Owner
Kelvin Abrokwa-Johnson
Kelvin Abrokwa-Johnson
Source Code for our bot that manages time and other functions of the server <3

Komi San wants you to study This repo contains the source code for our bot that manages time and other functions of the server <3 Features Your study

Komi San wants you to study 8 Nov 8, 2021
A simple terminal UI for viewing fund P/L analysis through TEFAS

Tefas UI A simple terminal UI for viewing fund P/L analysis through TEFAS. Features (that my own bank's UI lack): Daily and weekly P/L FX comparisons

Batuhan Taskaya 4 Mar 14, 2022
Fetch fund data from avanza.se using Python and some web scraping with bs4

Py(A)vanza Fetch fund data from avanza.se using Python and some web scraping with bs4. The default way is to display the data in the terminal, apply -

dunderrrrrr 1 Jan 27, 2022
Barbot is a discord bot made from discord.py and python, barbot is most to fun and roleplay for servers!

BarBot Main source of barbot Overview Barbot is a discord bot made from discord.py and python, barbot is most to fun and roleplay for servers! Links i

AlexyDaCoder 3 Nov 28, 2021
Discord bot code to stop users that are scamming with fake messages of free discord nitro on servers in order to steal users accounts.

AntiScam Discord bot code to stop users that are scamming with fake messages of free discord nitro on servers in order to steal users accounts. How to

H3cJP 94 Dec 15, 2022
A Discord bot that allows you to rapidly deploy Minecraft servers seamlessly and painlessly from Discord.

Lyra - rapidly and painlessly deploy Minecraft servers from Discord Lyra lets you deploy Minecraft server instances via Docker with control through a

null 1 Dec 23, 2021
Innocent-Bot - A Discord client self-bot for destroying, nuking and causing mischief in servers

Innocent-bot A Discord client self-bot for destroying, nuking and causing mischi

†† 5 Jan 26, 2022
It's a Discord bot to control your PC using your Discord Channel or using Reco: Discord PC Remote Controller App.

Reco PC Server Reco PC Server is a cross platform PC Controller Discord Bot which is a modified and improved version of Chimera for Reco-Discord PC Re

Arvinth Krishna 12 Aug 31, 2022
Make a command interpreter that manages AirBnb objects

AirBnB Clone Project Description This is part 1 of our AirBnb Clone project. The purpose of this project is to make a command interpreter that manages

Firdaus H. Salim 1 Nov 14, 2021
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

ThΓ©o 2 Sep 15, 2022