package
0.0.6
Repository: https://github.com/jon4hz/deadshot.git
Documentation: pkg.go.dev

# Functions

Close closes the database connection.
ExactBuyTrigger is the function used to trigger a buy.
ExactSellTrigger is the function used to trigger a sell.
FetchAllNetworks fetches all networks from the database.
FetchBalance returns the balance of the token by the contract address and network id.
No description provided by the author
No description provided by the author
No description provided by the author
LoadAllAmountModes fetches all amount modes from the database and sets them as a global variable..
LoadAllTargetTypes fetches all trade types from the database and sets them as a global variable.
LoadAllTradeTypes fetches all trade types from the database and sets them as a global variable..
No description provided by the author
NewEndpoint creates a new endpoint.
NewExactTarget creates a new target.
NewPercentageAmountTarget create a new target where the amount is a percentage of the total amount of the trade.
NewPercentagePriceAndAmountTarget creates a new target where the trade is triggered as soon as the price changes by a certain percentage and the amount is a percentage of the total amount of the trade.
NewPercentagePriceTarget create a new target where the trade is triggered as soon as the price changes by a certain percentage.
NewRawTarget creates a new raw target.
NewTargetWithDefaults creates a new target with default values.
NewToken creates a new token.
NewTrade creates a new trade.
SaveTokenUniqueByContractAndNetworkID saves the token in the database.
SaveTrade saves the trade to the database.
UpdateBalanceByContractAndNetworkID updates the balance of the token by the contract address and network id.

# Constants

No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
1% (support up to 2 decimals).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
Dex is the database model for a decentralized exchange.
Endpoint represents a node endpoint, either http or ws.
No description provided by the author
No description provided by the author
RawTarget is a struct that contains the raw values of the price and amount of a target Currently the price and amount bust be a decimal string.
Target is the database model for a target.
No description provided by the author
Token represents a token with some basic informations must be identical to the struct internal/blockchain/multicall/token.
Trade is the database model for a trade.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author