haasomeapi.apis.CustomBotApi module

Functions

class haasomeapi.apis.CustomBotApi.CustomBotApi(connectionstring: str, privatekey: str)

Bases: haasomeapi.apis.ApiBase.ApiBase

The Custom Bot API Class. Gives access to the Custom Bot api endpoints

Parameters:
  • connectionstring – str: Connection String Formatted Ex. http://127.0.0.1:9000
  • privatekey – str: Private Key Set In The Haas Settings
activate_custom_bot(botguid: str, withextra: bool)

Activates a custom bot

Parameters:
  • botguid – str: Custm bot guid
  • withextra – bool: with extra
Returns:

HaasomeClientResponse

Returns:

In .result bool: If activation was successful

add_advanced_index_bot_index(botguid: str, index: haasomeapi.dataobjects.custombots.dataobjects.AdvancedIndexBotIndexSaveObject.AdvancedIndexBotIndexSaveObject, realocatebalance: bool, raisebalance: bool)

Addes a index to preexiting advanced index bot :param botguid: str: Custom bot guid :param index: AdvancedIndexBotIndexSaveObject Index to add :param reallocatebalance: bool: reallocate current index balance :param raisebalance: bool: increase current index balance

Returns:HaasomeClientResponse
Returns:In .result AdvancedIndexBot: Crypto Index bot object
add_crypto_index_bot_index(botguid: str, index: haasomeapi.dataobjects.custombots.dataobjects.CryptoIndexBotIndexSaveObject.CryptoIndexBotIndexSaveObject, realocatebalance: bool, raisebalance: bool)

Addes a index to preexiting crypto index bot :param botguid: str: Custom bot guid :param index: CryptoIndexBotIndexSaveObject Index to add :param reallocatebalance: bool: reallocate current index balance :param raisebalance: bool: increase current index balance

Returns:HaasomeClientResponse
Returns:In .result CryptoIndexBot: Crypto Index bot object
add_order_bot_order(botguid: str, dependson: str, dependsonnotexecuted: str, amount: float, price: float, triggerprice: float, templateguid: str, direction: haasomeapi.enums.EnumOrderType.EnumOrderType, triggertype: haasomeapi.enums.EnumOrderBotTriggerType.EnumOrderBotTriggerType)

Add a order to a order bot

Parameters:
  • botguid – str: Custom bot guid
  • dependson – str: Order template guid this order depends on
  • dependsonnotexecuted – str: Order guid this depends on to not be executed.
  • amount – float: Trade amount to use
  • price – float: Price for the order
  • triggerprice – float: Trigger price for the order
  • templateguid – str: Order template for order to use guid
  • directionEnumOrderType: Order direction (Buy/Sell)
  • triggertypeEnumOrderBotTriggerType: Trigger type
Returns:

HaasomeClientResponse

Returns:

In .result OrderBot: Order bot object

backtest_custom_bot(botguid: str, minutestotest: int)

Backtest a custom bot (Note: This function will will make a request to the exchange so don’t call to often)

Parameters:
  • botguid – str: Custom bot guid
  • minutestotest – int: Amount of minutes to test in the past
Returns:

HaasomeClientResponse

Returns:

In .result BaseCustomBot: BaseCustomBot of the bot that was backtested

backtest_custom_bot_on_market(accountguid: str, botguid: str, minutestotest: int, primarycoin: str, secondarycoin: str, contractname: str)

Backtest a custom bot on specified market place (Note: This function does not call the exchange can use has often as you want.)

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • minutestotest – int: Amount of minutes to test in the past
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • contractname – str: Contract name (Optional)
Returns:

HaasomeClientResponse

Returns:

In .result BaseCustomBot: BaseCustomBot of the bot that was backtested

backtest_custom_bot_unix_time(botguid: str, startunix: int, endunix: int)

Backtest a custom bot (Note: This function will make a request to the exchange so don’t call to often)

Parameters:
  • botguid – str: Custom bot guid
  • startunix – int: Start time in unix time notation
  • endunix – int: End time in unix time notation
Returns:

HaasomeClientResponse

Returns:

In .result BaseCustomBot: BaseCustomBot of the bot that was backtested

clear_custom_bot(botguid: str)

Clears custom bots history and returns a BaseCustomBot object

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result BaseCustomBot: BaseCustomBot of the bot that was cleared
clear_custom_bot_specific(botguid: str, bottype: haasomeapi.enums.EnumCustomBotType.EnumCustomBotType)

Clears custom bots history and returns the specific custombot object

Parameters:
  • botguid – str: Custom bot guid
  • bottypeEnumCustomBotType: Custom bot type to return
Returns:

HaasomeClientResponse

Returns:

In .result any: Specified custom bot object

clone_custom_bot(accountguid: str, botguid: str, bottype: haasomeapi.enums.EnumCustomBotType.EnumCustomBotType, botname: str, primarycoin: str, secondarycoin: str, contractname: str, leverage: float)

Clone a custom bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • bottypeEnumCustomBotType: The bottype to create
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • contractname – str: Contract name (Optional)
  • leverage – float: Leverage percentage to use (Optional)
Returns:

HaasomeClientResponse

Returns:

In .result any: Specified bot type object

clone_custom_bot_simple(accountguid: str, botguid: str, botname: str)

Clone a custom bot simplefied

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid to clone
  • botname – str: Name for the new custom bot
Returns:

HaasomeClientResponse

Returns:

In .result BaseCustomBot: BaseCustomBot of the bot that was backtested

deactivate_custom_bot(botguid: str, withextra: bool)

Deactivates a custom bot

Parameters:
  • botguid – str: Custm bot guid
  • withextra – bool: with extra
Returns:

HaasomeClientResponse

Returns:

Int .result bool: If deactivation was successful

edit_order_bot_order(botguid: str, orderguid: str, dependson: str, dependsonnotexecuted: str, amount: float, price: float, triggerprice: float, templateguid: str, direction: haasomeapi.enums.EnumOrderType.EnumOrderType, triggertype: haasomeapi.enums.EnumOrderBotTriggerType.EnumOrderBotTriggerType)

Edit a order on a order bot

Parameters:
  • botguid – str: Custom bot guid
  • orderguid – str: Guid of order to edit
  • dependson – str: Order template guid this order depends on
  • dependsonnotexecuted – str: Order guid this depends on to not be executed.
  • amount – float: Trade amount to use
  • price – float: Price for the order
  • triggerprice – float: Trigger price for the order
  • templateguid – str: Order template for order to use guid
  • directionEnumOrderType: Order direction (Buy/Sell)
  • triggertypeEnumOrderBotTriggerType: Trigger type
Returns:

HaasomeClientResponse

Returns:

In .result OrderBot: Order bot object

flash_crash_bot_add_buy_order(botguid: str)

Quick call to add a buy order to a running flash crash_bot

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result FlashCrashBot: Flash Crash bot object
flash_crash_bot_add_sell_order(botguid: str)

Quick call to add a sell order to a running flash crash_bot

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result FlashCrashBot: Flash Crash bot object
flash_crash_bot_live_edit(botguid: str, isbuyorder: bool, addorder: bool)

Add a order to a running flash crash

Parameters:
  • botguid – str: Custom bot guid
  • isbuyorder – bool: Is the order to add a buy order
  • addorder – bool: Should we be adding the order or removing one
Returns:

HaasomeClientResponse

Returns:

In .result FlashCrashBot: Flash Crash bot object

flash_crash_bot_quck_start(botguid: str)

Flash crash quick start (Do not replace orders)

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result bool: If quick start was successful
flash_crash_bot_quick_start_all(botguid: str)

Flash crash quick start (Replace orders missing)

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result bool: If quick start was successful
flash_crash_bot_remove_buy_order(botguid: str)

Quick call to remove a buy order to a running flash crash_bot

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result FlashCrashBot: Flash Crash bot object
flash_crash_bot_remove_sell_order(botguid: str)

Quick call to remove a sell order to a running flash crash_bot

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result FlashCrashBot: Flash Crash bot object
flip_accumulation_bot(botguid: str)

Flip Accumulation bot from buy to sold or sold to buy

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result bool: If flip was successful
get_all_custom_bots()

Returns all custom bots created

Returns:HaasomeClientResponse
Returns:In .result List[BaseCustomBot]
get_custom_bot(botguid: str, bottype: haasomeapi.enums.EnumCustomBotType.EnumCustomBotType)

Returns custom bot matching bot guid

Parameters:
  • botguid – str: Custom bot guid
  • bottypeEnumCustomBotType: Type of bot to return
Returns:

HaasomeClientResponse

Returns:

In .result any: Specified bottype object

include_advanced_index_bot_index(botguid: str, coin: str)

Includes a excluded index from the advanced index bot :param botguid: str: Custom bot guid :param coin: std: Coin to include from index

Returns:HaasomeClientResponse
Returns:In .result AdvancedIndexBot: Crypto Index bot object
new_custom_bot(accountguid: str, bottype: haasomeapi.enums.EnumCustomBotType.EnumCustomBotType, botname: str, primarycoin: str, secondarycoin: str, contractname: str)

Create a new custom bot

Parameters:
  • accountguid – str: Account guid
  • bottypeEnumCustomBotType: The bottype to create
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • contractname – str: Contract name (Optional)
Returns:

HaasomeClientResponse

Returns:

In .result any: Specified bot type object

new_custom_bot_from_market(accountguid: str, bottype: haasomeapi.enums.EnumCustomBotType.EnumCustomBotType, botname: str, market: haasomeapi.dataobjects.marketdata.Market.Market)

Create a new custom bot from market object

Parameters:
  • accountguid – str: Account guid
  • bottypeEnumCustomBotType: The bottype to create
  • botname – str: Name for the new custom bot
Parama market:

Market: Market object to use

Returns:

HaasomeClientResponse

Returns:

In .result any: Specified bot type object

rebalance_advanced_index_bot_index(botguid: str)

Rebalance a advanced index bot :param botguid: str: Custom bot guid

Returns:HaasomeClientResponse
Returns:In .result AdvancedIndexBot: Crypto Index bot object
remove_advanced_index_bot_index(botguid: str, coin: str, lowerbalance: bool)

Removes a index from preexiting advanced index bot :param botguid: str: Custom bot guid :param coin: std: Coin to remove from index :param lowerbalance: bool: Reduce the index balance

Returns:HaasomeClientResponse
Returns:In .result AdvancedIndexBot: Crypto Index bot object
remove_all_order_bot_order(botguid: str)

Removes all orders from order bot

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result OrderBot: Order bot object
remove_crypto_index_bot_index(botguid: str, coin: str, lowerbalance: bool)

Removes a index from preexiting crypto index bot :param botguid: str: Custom bot guid :param coin: std: Coin to remove from index :param lowerbalance: bool: Reduce the index balance

Returns:HaasomeClientResponse
Returns:In .result CryptoIndexBot: Crypto Index bot object
remove_custom_bot(botguid: str)

Removes (deletes) custom bot

Parameters:botguid – str: Custom bot guid
Returns:HaasomeClientResponse
Returns:In .result bool: If removal was succesfull
remove_order_bot_order(botguid: str, orderguid: str)

Remove (delete) a order on a order bot

Parameters:
  • botguid – str: Custom bot guid
  • orderguid – str: Order guid
Returns:

HaasomeClientResponse

Returns:

In .result OrderBot: Order bot object

reset_order_bot_order(botguid: str, orderguid: str)

Reset a order on a order bot

Parameters:
  • botguid – str: Custom bot guid
  • orderguid – str: Order guid
Returns:

HaasomeClientResponse

Returns:

In .result OrderBot: Order bot object

set_mad_hatter_indicator_parameter(botguid: str, type: haasomeapi.enums.EnumMadHatterIndicators.EnumMadHatterIndicators, fieldNo: int, value: any)

Modify Mad Hatter Indicator Parameter

Parameters:
  • botguid – str: Custom bot guid
  • typeEnumMadHatterIndicators: Indicator type to modify
  • fieldNo – int: Field to modify
  • value – any: Value for the field
Returns:

HaasomeClientResponse

Returns:

In .result MadHatterBot: Mad Hatter bot object

set_mad_hatter_safety_parameter(botguid: str, type: haasomeapi.enums.EnumMadHatterSafeties.EnumMadHatterSafeties, value: any)

Modify Mad hatter Safety Parameter

Parameters:
  • botguid – str: Custom Bot guid
  • typeEnumMadHatterSafeties: Safety Type to modify
  • value – any: Safety Value
Returns:

HaasomeClientResponse

Returns:

In .result MadHatterBot: Mad Hatter bot object

setup_accumulation_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, stoptype: haasomeapi.enums.EnumAccumulationBotStopType.EnumAccumulationBotStopType, stoptypevalue: float, randomordersizex: float, randomordersizey: float, randomordertimex: int, randomordertimey: int, direction: haasomeapi.enums.EnumOrderType.EnumOrderType, triggeronprice: bool, triggerwhenhigher: bool, triggervalue: float)

Modify a Accumulation bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • stoptypeEnumAccumulationBotStopType: The stop type
  • stoptypevalue – float: Stop value associated with stop type
  • randomordersizex – float: Random order size start
  • randomordersizey – float: Random order size end
  • randomordertimex – int: Random order time in seconds start
  • randomordertimey – int: Random order time in seconds stop
  • directionEnumOrderType: Order direction (buy/sell)
  • triggeronprice – bool: Trigger on a specific price
  • triggerwhenhigher – bool: Trigger when marker price is higher than trigger price
  • triggervalue – float: Trigger price
Returns:

HaasomeClientResponse

Returns:

In .result AccumulationBot: Accumulation bot object

setup_advanced_index_bot(accountguid: str, botguid: str, botname: str, templateguid: str, basecoin: str, totalIndexValue: float, rebalanceInterval: int, rebalanceType: haasomeapi.enums.EnumAdvancedIndexBotRebalanceType.EnumAdvancedIndexBotRebalanceType, allocateProfits: bool, preserveBaseIndexPrecentage: bool, index: List[haasomeapi.dataobjects.custombots.dataobjects.AdvancedIndexBotIndexSaveObject.AdvancedIndexBotIndexSaveObject])

Modify a Crypto Index bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • templateguid – str: Order template to use GUID
  • basecoin – str: The base currency for the index bot Ex. BTC
  • totalIndexValue – float: Total value the index should be using.
  • rebalanceInterval – int: How often to rebalance
  • allocateprofits – bool: Perform allocation of profits
  • preserveBaseIndexPercentage – bool: Ensure index perecentage never dips below start percentage
  • index – List[AdvancedIndexBotIndexSaveObject]: List of AdvancedIndexBotIndexSaveObject to construct the index.
Returns:

HaasomeClientResponse

Returns:

In .result AdvancedIndexBot: Crypto Index bot object

setup_crypto_index_bot(accountguid: str, botguid: str, botname: str, templateguid: str, basecoin: str, totalIndexValue: float, individualgrowth: bool, allocateprofits: bool, index: List[haasomeapi.dataobjects.custombots.dataobjects.CryptoIndexBotIndexSaveObject.CryptoIndexBotIndexSaveObject])

Modify a Crypto Index bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • templateguid – str: Order template to use GUID
  • basecoin – str: The base currency for the index bot Ex. BTC
  • totalIndexValue – float: Total value the index should be using.
  • individualgrowth – bool: Use the individual growth algorithm
  • allocateprofits – bool: Perform allocation of profits
  • index – List[CryptoIndexBotIndexSaveObject]: List of CryptoIndexBotIndexSaveObject to construct the index.
Returns:

HaasomeClientResponse

Returns:

In .result CryptoIndexBot: Crypto Index bot object

setup_email_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, contractname: str, leverage: float, amountType: haasomeapi.enums.EnumBotTradeAmount.EnumBotTradeAmount, tradeamount: float, fee: float, templateguid: str, position: str, actions: List[haasomeapi.dataobjects.custombots.dataobjects.EmailBotAction.EmailBotAction], stoploss: float, minchangetobuy: float, minchangetosell: float)

Modify a Email bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • contractname – str: Contract name (Optional)
  • leverage – float: Leverage percentage to use (Optional)
  • amountTypeEnumBotTradeAmount Trade amount type
  • tradeamount – float: Trade amount for the bot to use
  • fee – float: Fee percentage to be used in calculations
  • templateguid – str: Order template to be used GUID
  • position – str: Position bot should start in EX. For BNB/BTC if you have no BNB set to BTC
  • actions – List[EmailBotAction]: List of EmailBotAction to build the email bot from
  • stoploss – float: Stop loss percentage
  • minchangetobuy – float: Min Change To Buy insurance setting
  • minchangetosell – float: Min Change To Sell Insurance setting
Returns:

HaasomeClientResponse

Returns:

In .result EmailBot: Email bot object

setup_flash_crash_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, fee: float, baseprice: float, priceSpreadType: haasomeapi.enums.EnumFlashSpreadOptions.EnumFlashSpreadOptions, pricespread: float, percentageboost: float, minpercentage: float, maxpercentage: float, amounttype: haasomeapi.enums.EnumCurrencyType.EnumCurrencyType, amountspread: float, buyamount: float, sellamount: float, refilldelay: int, safetyenabled: bool, safetytriggerlevel: float, safetymoveinout: bool, followthetrend: bool, followthetrendchannelrange: int, followthetrendchanneloffset: int, followthetrendtimeout: int)

Modify a Flash Crash bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • fee – float: Fee percentage to be used in calculations
  • baseprice – float: Base price for FCB to start at
  • priceSpreadTypeEnumFlashSpreadOptions: FCB Spread Type
  • pricespread – float: Price spread value
  • percentageboost – float: Percentage boost value to be set with PercentageBoost spread type.
  • minpercentage – float: Min Percentage value to be used with percentage spread type
  • maxpercentage – float: Max Percentage value to be used with percentage spread type
  • amounttypeEnumCurrencyType: Currency type
  • amountspread – float: Current amount spread value
  • buyamount – float: Number of buy orders
  • sellamount – float: Number of sell orders
  • refilldelay – int: Refill order delay in minutes
  • safetyenabled – bool: Enable the safety
  • safetytriggerlevel – float: Price value saftey should activate
  • safetymoveinout – bool: Safety move in out value
  • followthetrend – bool: Activate follow the trend
  • followthetrendchannelrange – int: Follow the trend channel range
  • followthetrendchanneloffset – int: Follow the trend channel offset
  • followthetrendtimeout – int: Follow the trend timeout value
Returns:

HaasomeClientResponse

Returns:

In .result FlashCrashBot: Flash Crash bot object

setup_intellibot_alice(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, contractname: str, leverage: float, amountType: haasomeapi.enums.EnumBotTradeAmount.EnumBotTradeAmount, tradeamount: float, fee: float)

Modify Intelli Bot Alice bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • contractname – str: Contract name (Optional)
  • leverage – float: Leverage percentage to use (Optional)
  • amountTypeEnumBotTradeAmount Trade amount type
  • tradeamount – float: Trade amount to use
  • fee – float: Fee percentage to be used in calculations
Returns:

HaasomeClientResponse

Returns:

In .result BaseCustomBot: BaseCustomBot Object

setup_inter_exchange_arbitrage_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, accountguid2: str, primarycoin2: str, secondarycoin2: str, tradeamount: float, triggerlevel: float, templateguid: str, maxamount: float, maxtrades: int)

Modify Inter Exchange Arbitrage bot :param accountguid: str: Account guid :param botguid: str: Custom bot guid :param botname: str: Name for the new custom bot :param primarycoin: str: Primary currency Ex. If BNB/BTC then set this to BNB :param secondarycoin: str: Secondary currency Ex. If BNB/BTC then set this to BTC :param accountguid2: str: Seoncdary Account Guid :param primarycoin2: str: Primary currency of the second account Ex. If BNB/BTC then set this to BNB :param secondarycoin2: str: Secondary currency of the second account Ex. If BNB/BTC then set this to BTC :param tradeamount: float: Trade amount to use :param triggerlevel: float: Trigger level for trades in percentage :param templateguid: str: Order template to use Guid :param maxamount: float: Max amount to trade a day :param maxtrades: int: Max trades to execute a day

Returns:HaasomeClientResponse
Returns:In .result InterExchangeArbitrageBot: Inter Exchange Arbitrage bot object
setup_mad_hatter_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, templateguid: str, position: str, fee: float, amountType: haasomeapi.enums.EnumBotTradeAmount.EnumBotTradeAmount, tradeamount: float, useconsensus: bool, disableafterstoploss: bool, interval: int, includeincompleteinterval: bool, mappedbuysignal: haasomeapi.enums.EnumBotTradeAmount.EnumBotTradeAmount, mappedsellsignal: haasomeapi.enums.EnumBotTradeAmount.EnumBotTradeAmount)

Modify Mad Hatter bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • templateguid – str: Order template to use Guid
  • position – str: Position bot should start in EX. For BNB/BTC if you have no BNB set to BTC
  • fee – float: Fee percentage to be used in calculations
  • amountTypeEnumBotTradeAmount Trade amount type
  • tradeamount – float: Trade amount to use
  • useconsensus – bool: Enable Consensus Mode
  • disableafterstoploss – bool: Disable bot after stop loss
  • interval – int: Price Ticker Minute Interval. Ex. 1,2,3,,5,15,30, etc
  • includeincompleteinterval – bool: Allow a incomplete price ticker
Returns:

HaasomeClientResponse

Returns:

In .result MadHatterBot: Mad Hatter bot object

setup_market_making_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, tradeamount: float, fee: float, offset: float, resettimeout: int, usedsecondorder: bool, secondoffset: float)

Modify Market Making bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • tradeamount – float: Trade amount to use
  • fee – float: Fee percentage to be used in calculations
  • offset – float: First order offset value
  • resettimeout – int: Reset timeout in minutes
  • usedsecondorder – bool: Use a second order
  • secondoffset – float: Second order offset
Returns:

HaasomeClientResponse

Returns:

In .result MarketMakingBot: Market Making bot object

setup_order_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str)

Modify Order bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
Returns:

HaasomeClientResponse

Returns:

In .result OrderBot: Order bot object

setup_ping_pong_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, contractbame: str, leverage: float, amountType: haasomeapi.enums.EnumBotTradeAmount.EnumBotTradeAmount, tradeamount: float, position: str, fee: float)

Modify Ping Pong bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • contractname – str: Contract name (Optional)
  • leverage – float: Leverage percentage to use (Optional)
  • amountTypeEnumBotTradeAmount Trade amount type
  • tradeamount – float: Trade amount to use
  • position – str: Position bot should start in EX. For BNB/BTC if you have no BNB set to BTC
  • fee – float: Fee percentage to be used in calculations
Returns:

HaasomeClientResponse

Returns:

In .result BaseCustomBot: Ping Pong is just a BaseCustomBot - BaseCustomBot object

setup_scalper_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, templateguid: str, contractname: str, leverage: float, amountType: haasomeapi.enums.EnumBotTradeAmount.EnumBotTradeAmount, tradeamount: float, position: str, fee: float, targetpercentage: float, safetythreshold: float)

Modify Scalper bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • templateguid – str: Order template to use Guid
  • contractname – str: Contract name (Optional)
  • leverage – float: Leverage percentage to use (Optional)
  • amountTypeEnumBotTradeAmount Trade amount type
  • tradeamount – float: Trade amount to use
  • position – str: Position bot should start in EX. For BNB/BTC if you have no BNB set to BTC
  • fee – float: Fee percentage to be used in calculations
  • targetpercentage – float:
  • safetythreshold – float:
Returns:

HaasomeClientResponse

Returns:

In .result ScalperBot: Scalper bot object

setup_script_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, templateguid: str, contractbame: str, leverage: float, tradeamount: float, position: str, fee: float, scriptid: str)

Modify Script bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC

:param templateguid :str: Order template to use Guid :param contractbame: str: Contract name (Optional) :param leverage: float: Leverage percentage to use (Optional) :param tradeamount: float: Trade amount to use :param position: str: Position bot should start in EX. For BNB/BTC if you have no BNB set to BTC :param fee: float: Fee percentage to be used in calculations :param scriptid: str: Script Id for bot to use

Returns:HaasomeClientResponse
Returns:In .result ScriptBot: Script Bot Object
setup_script_bot_parameters(botguid: str, fieldno: int, value: any)

Modify script bot parameters

Parameters:
  • botguid – str: Custom bot guid
  • fieldno – int: Field Number to modify
  • value – any: Value for field
Returns:

HaasomeClientResponse

Returns:

In .result ScriptBot: Script bot object

setup_zone_recovery_bot(accountguid: str, botguid: str, botname: str, primarycoin: str, secondarycoin: str, contractname: str, leverage: float, tradeamount: float, maxtradeamount: float, factorlong: float, factorshort: float, targetprofit: float, zone: float)

Modify zone_recovery_bot

Parameters:
  • accountguid – str: Account guid
  • botguid – str: Custom bot guid
  • botname – str: Name for the new custom bot
  • primarycoin – str: Primary currency Ex. If BNB/BTC then set this to BNB
  • secondarycoin – str: Secondary currency Ex. If BNB/BTC then set this to BTC
  • contractname – str: Contract name (Optional)
  • leverage – float: Leverage percentage to use (Optional)
  • tradeamount – float: Trade amount to use
  • maxtradeamount – float: Max Trade amount
  • factorlong – float: Factor long value
  • factorshort – float: Factor short value
  • targetprofit – float: Target profit percentage
  • zone – float: Zone value
Returns:

HaasomeClientResponse

Returns:

In .result ZoneRecoveryBot: Zone Recovery bot object