Skip to content

Commit

Permalink
Update to the latest Haas definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
FiretronP75 committed Apr 4, 2024
1 parent 9ebb9d4 commit 8724d8c
Show file tree
Hide file tree
Showing 7 changed files with 349 additions and 0 deletions.
21 changes: 21 additions & 0 deletions haas-production-flex-numbers/hs.trade-market-information.def.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ function ContractName(market) end
--- @overload fun(optionalParameters: OptionalParametersOf_ContractValue): number | number[]
function ContractValue(market) end

--- The optional parameters of GetAccountMarkets.
--- @shape OptionalParametersOf_GetAccountMarkets
--- @field accountId string | nil The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.

--- An array of markets affiliated with a particular account.
--- @param accountId string Optional - The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example. Suggestions: InputAccount, InputAccountMarket, InputMarket, AccountGuid
--- @return any Returns an array with all the markets as a string.
--- @overload fun(): any
--- @overload fun(optionalParameters: OptionalParametersOf_GetAccountMarkets): any
function GetAccountMarkets(accountId) end

--- An array of markets affiliated with a particular exchange.
--- @param exchangeCode string The exchange code affiliated with the exchange.
--- @return any Returns an array with all the markets as a string.
function GetExchangeMarkets(exchangeCode) end

--- The optional parameters of IsTradeAmountEnough.
--- @shape OptionalParametersOf_IsTradeAmountEnough
--- @field logWarning boolean | nil If true, a warning is logged.
Expand All @@ -94,6 +110,11 @@ function ContractValue(market) end
--- @overload fun(market: string, price: number | number[], amount: number | number[], optionalParameters: OptionalParametersOf_IsTradeAmountEnough): boolean
function IsTradeAmountEnough(market, price, amount, logWarning) end

--- Checks if the input is a valid market.
--- @param market string The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example. Suggestions: InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket
--- @return boolean Returns true if the market is valid. Output Suggestions: Or, And, IsTrue, IsFalse, Not, BoolToSignal, IfElse, Switch, IfElseIf, DoBuy, DoLong, DoSell, DoShort, DoExitPosition, DoFlipPosition, DoSignal, PlaceBuyOrder, PlaceSellOrder, PlaceGoLongOrder, PlaceGoShortOrder, PlaceExitLongOrder, PlaceExitShortOrder, PlaceExitPositionOrder, PlaceCancelledOrder
function IsValidMarket(market) end

--- The optional parameters of MakersFee.
--- @shape OptionalParametersOf_MakersFee
--- @field market string | nil The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.
Expand Down
21 changes: 21 additions & 0 deletions haas-production/hs.trade-market-information.def.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ function ContractName(market) end
--- @overload fun(optionalParameters: OptionalParametersOf_ContractValue): number
function ContractValue(market) end

--- The optional parameters of GetAccountMarkets.
--- @shape OptionalParametersOf_GetAccountMarkets
--- @field accountId string | nil The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.

--- An array of markets affiliated with a particular account.
--- @param accountId string Optional - The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example. Suggestions: InputAccount, InputAccountMarket, InputMarket, AccountGuid
--- @return any Returns an array with all the markets as a string.
--- @overload fun(): any
--- @overload fun(optionalParameters: OptionalParametersOf_GetAccountMarkets): any
function GetAccountMarkets(accountId) end

--- An array of markets affiliated with a particular exchange.
--- @param exchangeCode string The exchange code affiliated with the exchange.
--- @return any Returns an array with all the markets as a string.
function GetExchangeMarkets(exchangeCode) end

--- The optional parameters of IsTradeAmountEnough.
--- @shape OptionalParametersOf_IsTradeAmountEnough
--- @field logWarning boolean | nil If true, a warning is logged.
Expand All @@ -94,6 +110,11 @@ function ContractValue(market) end
--- @overload fun(market: string, price: number, amount: number, optionalParameters: OptionalParametersOf_IsTradeAmountEnough): boolean
function IsTradeAmountEnough(market, price, amount, logWarning) end

--- Checks if the input is a valid market.
--- @param market string The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example. Suggestions: InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket
--- @return boolean Returns true if the market is valid. Output Suggestions: Or, And, IsTrue, IsFalse, Not, BoolToSignal, IfElse, Switch, IfElseIf, DoBuy, DoLong, DoSell, DoShort, DoExitPosition, DoFlipPosition, DoSignal, PlaceBuyOrder, PlaceSellOrder, PlaceGoLongOrder, PlaceGoShortOrder, PlaceExitLongOrder, PlaceExitShortOrder, PlaceExitPositionOrder, PlaceCancelledOrder
function IsValidMarket(market) end

--- The optional parameters of MakersFee.
--- @shape OptionalParametersOf_MakersFee
--- @field market string | nil The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.
Expand Down
21 changes: 21 additions & 0 deletions haas-staging-flex-numbers/hs.trade-market-information.def.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ function ContractName(market) end
--- @overload fun(optionalParameters: OptionalParametersOf_ContractValue): number | number[]
function ContractValue(market) end

--- The optional parameters of GetAccountMarkets.
--- @shape OptionalParametersOf_GetAccountMarkets
--- @field accountId string | nil The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.

--- An array of markets affiliated with a particular account.
--- @param accountId string Optional - The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example. Suggestions: InputAccount, InputAccountMarket, InputMarket, AccountGuid
--- @return any Returns an array with all the markets as a string.
--- @overload fun(): any
--- @overload fun(optionalParameters: OptionalParametersOf_GetAccountMarkets): any
function GetAccountMarkets(accountId) end

--- An array of markets affiliated with a particular exchange.
--- @param exchangeCode string The exchange code affiliated with the exchange.
--- @return any Returns an array with all the markets as a string.
function GetExchangeMarkets(exchangeCode) end

--- The optional parameters of IsTradeAmountEnough.
--- @shape OptionalParametersOf_IsTradeAmountEnough
--- @field logWarning boolean | nil If true, a warning is logged.
Expand All @@ -94,6 +110,11 @@ function ContractValue(market) end
--- @overload fun(market: string, price: number | number[], amount: number | number[], optionalParameters: OptionalParametersOf_IsTradeAmountEnough): boolean
function IsTradeAmountEnough(market, price, amount, logWarning) end

--- Checks if the input is a valid market.
--- @param market string The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example. Suggestions: InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket
--- @return boolean Returns true if the market is valid. Output Suggestions: Or, And, IsTrue, IsFalse, Not, BoolToSignal, IfElse, Switch, IfElseIf, DoBuy, DoLong, DoSell, DoShort, DoExitPosition, DoFlipPosition, DoSignal, PlaceBuyOrder, PlaceSellOrder, PlaceGoLongOrder, PlaceGoShortOrder, PlaceExitLongOrder, PlaceExitShortOrder, PlaceExitPositionOrder, PlaceCancelledOrder
function IsValidMarket(market) end

--- The optional parameters of MakersFee.
--- @shape OptionalParametersOf_MakersFee
--- @field market string | nil The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.
Expand Down
21 changes: 21 additions & 0 deletions haas-staging/hs.trade-market-information.def.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ function ContractName(market) end
--- @overload fun(optionalParameters: OptionalParametersOf_ContractValue): number
function ContractValue(market) end

--- The optional parameters of GetAccountMarkets.
--- @shape OptionalParametersOf_GetAccountMarkets
--- @field accountId string | nil The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.

--- An array of markets affiliated with a particular account.
--- @param accountId string Optional - The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example. Suggestions: InputAccount, InputAccountMarket, InputMarket, AccountGuid
--- @return any Returns an array with all the markets as a string.
--- @overload fun(): any
--- @overload fun(optionalParameters: OptionalParametersOf_GetAccountMarkets): any
function GetAccountMarkets(accountId) end

--- An array of markets affiliated with a particular exchange.
--- @param exchangeCode string The exchange code affiliated with the exchange.
--- @return any Returns an array with all the markets as a string.
function GetExchangeMarkets(exchangeCode) end

--- The optional parameters of IsTradeAmountEnough.
--- @shape OptionalParametersOf_IsTradeAmountEnough
--- @field logWarning boolean | nil If true, a warning is logged.
Expand All @@ -94,6 +110,11 @@ function ContractValue(market) end
--- @overload fun(market: string, price: number, amount: number, optionalParameters: OptionalParametersOf_IsTradeAmountEnough): boolean
function IsTradeAmountEnough(market, price, amount, logWarning) end

--- Checks if the input is a valid market.
--- @param market string The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example. Suggestions: InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket
--- @return boolean Returns true if the market is valid. Output Suggestions: Or, And, IsTrue, IsFalse, Not, BoolToSignal, IfElse, Switch, IfElseIf, DoBuy, DoLong, DoSell, DoShort, DoExitPosition, DoFlipPosition, DoSignal, PlaceBuyOrder, PlaceSellOrder, PlaceGoLongOrder, PlaceGoShortOrder, PlaceExitLongOrder, PlaceExitShortOrder, PlaceExitPositionOrder, PlaceCancelledOrder
function IsValidMarket(market) end

--- The optional parameters of MakersFee.
--- @shape OptionalParametersOf_MakersFee
--- @field market string | nil The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.
Expand Down
131 changes: 131 additions & 0 deletions src/command/sample/command-production.sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19610,6 +19610,45 @@ export const commandProductionSample: CommandRaw[] = [
],
"ChangeTypes": []
},
{
"CommandName": "GetAccountMarkets",
"Parameters": [
{
"Index": 0,
"Name": "accountId",
"Type": 0,
"IsRequired": false,
"IsHidden": false,
"IsField": false,
"AllowNull": false,
"Description": "The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.",
"ScriptType": null,
"Suggestion": [
3401,
3402,
3406,
3600
]
}
],
"Command": 7223,
"CommandType": 1,
"Category": 37,
"Description": "An array of markets affiliated with a particular account.",
"ReturnDescription": "Returns an array with all the markets as a string.",
"OutputIndex": [],
"IsConstant": false,
"IsPrimary": true,
"RequiresCall": false,
"Resizable": false,
"OutputHidden": false,
"OutputType": 4,
"OutputSuggestions": [
4406,
4403
],
"ChangeTypes": []
},
{
"CommandName": "GetAllFilledOrders",
"Command": 5005,
Expand Down Expand Up @@ -20459,6 +20498,40 @@ export const commandProductionSample: CommandRaw[] = [
],
"ChangeTypes": []
},
{
"CommandName": "GetExchangeMarkets",
"Parameters": [
{
"Index": 0,
"Name": "exchangeCode",
"Type": 0,
"IsRequired": true,
"IsHidden": false,
"IsField": false,
"AllowNull": false,
"Description": "The exchange code affiliated with the exchange.",
"ScriptType": null,
"Suggestion": []
}
],
"Command": 7222,
"CommandType": 1,
"Category": 37,
"Description": "An array of markets affiliated with a particular exchange.",
"ReturnDescription": "Returns an array with all the markets as a string.",
"OutputIndex": [],
"IsConstant": false,
"IsPrimary": true,
"RequiresCall": false,
"Resizable": false,
"OutputHidden": false,
"OutputType": 4,
"OutputSuggestions": [
4406,
4403
],
"ChangeTypes": []
},
{
"CommandName": "GetFailedOrderMessage",
"Parameters": [
Expand Down Expand Up @@ -29293,6 +29366,64 @@ export const commandProductionSample: CommandRaw[] = [
],
"ChangeTypes": []
},
{
"CommandName": "IsValidMarket",
"Parameters": [
{
"Index": 0,
"Name": "market",
"Type": 0,
"IsRequired": true,
"IsHidden": false,
"IsField": false,
"AllowNull": false,
"Description": "The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.",
"ScriptType": null,
"Suggestion": [
3402,
3406,
3411,
3604
]
}
],
"Command": 7221,
"CommandType": 1,
"Category": 37,
"Description": "Checks if the input is a valid market.",
"ReturnDescription": "Returns true if the market is valid.",
"OutputIndex": [],
"IsConstant": false,
"IsPrimary": true,
"RequiresCall": false,
"Resizable": false,
"OutputHidden": false,
"OutputType": 3,
"OutputSuggestions": [
3211,
3210,
3206,
3300,
6019,
3303,
3302,
3301,
3801,
3802,
3800,
3804,
3803,
7400,
7406,
7404,
7405,
7401,
7403,
7402,
7407
],
"ChangeTypes": []
},
{
"CommandName": "KAMA",
"Parameters": [
Expand Down
Loading

0 comments on commit 8724d8c

Please sign in to comment.