Skip to content

Commit 8724d8c

Browse files
committed
Update to the latest Haas definitions.
1 parent 9ebb9d4 commit 8724d8c

File tree

7 files changed

+349
-0
lines changed

7 files changed

+349
-0
lines changed

haas-production-flex-numbers/hs.trade-market-information.def.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,22 @@ function ContractName(market) end
8080
--- @overload fun(optionalParameters: OptionalParametersOf_ContractValue): number | number[]
8181
function ContractValue(market) end
8282

83+
--- The optional parameters of GetAccountMarkets.
84+
--- @shape OptionalParametersOf_GetAccountMarkets
85+
--- @field accountId string | nil The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.
86+
87+
--- An array of markets affiliated with a particular account.
88+
--- @param accountId string Optional - The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example. Suggestions: InputAccount, InputAccountMarket, InputMarket, AccountGuid
89+
--- @return any Returns an array with all the markets as a string.
90+
--- @overload fun(): any
91+
--- @overload fun(optionalParameters: OptionalParametersOf_GetAccountMarkets): any
92+
function GetAccountMarkets(accountId) end
93+
94+
--- An array of markets affiliated with a particular exchange.
95+
--- @param exchangeCode string The exchange code affiliated with the exchange.
96+
--- @return any Returns an array with all the markets as a string.
97+
function GetExchangeMarkets(exchangeCode) end
98+
8399
--- The optional parameters of IsTradeAmountEnough.
84100
--- @shape OptionalParametersOf_IsTradeAmountEnough
85101
--- @field logWarning boolean | nil If true, a warning is logged.
@@ -94,6 +110,11 @@ function ContractValue(market) end
94110
--- @overload fun(market: string, price: number | number[], amount: number | number[], optionalParameters: OptionalParametersOf_IsTradeAmountEnough): boolean
95111
function IsTradeAmountEnough(market, price, amount, logWarning) end
96112

113+
--- Checks if the input is a valid market.
114+
--- @param market string The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example. Suggestions: InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket
115+
--- @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
116+
function IsValidMarket(market) end
117+
97118
--- The optional parameters of MakersFee.
98119
--- @shape OptionalParametersOf_MakersFee
99120
--- @field market string | nil The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.

haas-production/hs.trade-market-information.def.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,22 @@ function ContractName(market) end
8080
--- @overload fun(optionalParameters: OptionalParametersOf_ContractValue): number
8181
function ContractValue(market) end
8282

83+
--- The optional parameters of GetAccountMarkets.
84+
--- @shape OptionalParametersOf_GetAccountMarkets
85+
--- @field accountId string | nil The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.
86+
87+
--- An array of markets affiliated with a particular account.
88+
--- @param accountId string Optional - The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example. Suggestions: InputAccount, InputAccountMarket, InputMarket, AccountGuid
89+
--- @return any Returns an array with all the markets as a string.
90+
--- @overload fun(): any
91+
--- @overload fun(optionalParameters: OptionalParametersOf_GetAccountMarkets): any
92+
function GetAccountMarkets(accountId) end
93+
94+
--- An array of markets affiliated with a particular exchange.
95+
--- @param exchangeCode string The exchange code affiliated with the exchange.
96+
--- @return any Returns an array with all the markets as a string.
97+
function GetExchangeMarkets(exchangeCode) end
98+
8399
--- The optional parameters of IsTradeAmountEnough.
84100
--- @shape OptionalParametersOf_IsTradeAmountEnough
85101
--- @field logWarning boolean | nil If true, a warning is logged.
@@ -94,6 +110,11 @@ function ContractValue(market) end
94110
--- @overload fun(market: string, price: number, amount: number, optionalParameters: OptionalParametersOf_IsTradeAmountEnough): boolean
95111
function IsTradeAmountEnough(market, price, amount, logWarning) end
96112

113+
--- Checks if the input is a valid market.
114+
--- @param market string The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example. Suggestions: InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket
115+
--- @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
116+
function IsValidMarket(market) end
117+
97118
--- The optional parameters of MakersFee.
98119
--- @shape OptionalParametersOf_MakersFee
99120
--- @field market string | nil The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.

haas-staging-flex-numbers/hs.trade-market-information.def.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,22 @@ function ContractName(market) end
8080
--- @overload fun(optionalParameters: OptionalParametersOf_ContractValue): number | number[]
8181
function ContractValue(market) end
8282

83+
--- The optional parameters of GetAccountMarkets.
84+
--- @shape OptionalParametersOf_GetAccountMarkets
85+
--- @field accountId string | nil The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.
86+
87+
--- An array of markets affiliated with a particular account.
88+
--- @param accountId string Optional - The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example. Suggestions: InputAccount, InputAccountMarket, InputMarket, AccountGuid
89+
--- @return any Returns an array with all the markets as a string.
90+
--- @overload fun(): any
91+
--- @overload fun(optionalParameters: OptionalParametersOf_GetAccountMarkets): any
92+
function GetAccountMarkets(accountId) end
93+
94+
--- An array of markets affiliated with a particular exchange.
95+
--- @param exchangeCode string The exchange code affiliated with the exchange.
96+
--- @return any Returns an array with all the markets as a string.
97+
function GetExchangeMarkets(exchangeCode) end
98+
8399
--- The optional parameters of IsTradeAmountEnough.
84100
--- @shape OptionalParametersOf_IsTradeAmountEnough
85101
--- @field logWarning boolean | nil If true, a warning is logged.
@@ -94,6 +110,11 @@ function ContractValue(market) end
94110
--- @overload fun(market: string, price: number | number[], amount: number | number[], optionalParameters: OptionalParametersOf_IsTradeAmountEnough): boolean
95111
function IsTradeAmountEnough(market, price, amount, logWarning) end
96112

113+
--- Checks if the input is a valid market.
114+
--- @param market string The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example. Suggestions: InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket
115+
--- @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
116+
function IsValidMarket(market) end
117+
97118
--- The optional parameters of MakersFee.
98119
--- @shape OptionalParametersOf_MakersFee
99120
--- @field market string | nil The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.

haas-staging/hs.trade-market-information.def.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,22 @@ function ContractName(market) end
8080
--- @overload fun(optionalParameters: OptionalParametersOf_ContractValue): number
8181
function ContractValue(market) end
8282

83+
--- The optional parameters of GetAccountMarkets.
84+
--- @shape OptionalParametersOf_GetAccountMarkets
85+
--- @field accountId string | nil The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.
86+
87+
--- An array of markets affiliated with a particular account.
88+
--- @param accountId string Optional - The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example. Suggestions: InputAccount, InputAccountMarket, InputMarket, AccountGuid
89+
--- @return any Returns an array with all the markets as a string.
90+
--- @overload fun(): any
91+
--- @overload fun(optionalParameters: OptionalParametersOf_GetAccountMarkets): any
92+
function GetAccountMarkets(accountId) end
93+
94+
--- An array of markets affiliated with a particular exchange.
95+
--- @param exchangeCode string The exchange code affiliated with the exchange.
96+
--- @return any Returns an array with all the markets as a string.
97+
function GetExchangeMarkets(exchangeCode) end
98+
8399
--- The optional parameters of IsTradeAmountEnough.
84100
--- @shape OptionalParametersOf_IsTradeAmountEnough
85101
--- @field logWarning boolean | nil If true, a warning is logged.
@@ -94,6 +110,11 @@ function ContractValue(market) end
94110
--- @overload fun(market: string, price: number, amount: number, optionalParameters: OptionalParametersOf_IsTradeAmountEnough): boolean
95111
function IsTradeAmountEnough(market, price, amount, logWarning) end
96112

113+
--- Checks if the input is a valid market.
114+
--- @param market string The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example. Suggestions: InputAccountMarket, InputMarket, InputPriceSourceMarket, PriceMarket
115+
--- @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
116+
function IsValidMarket(market) end
117+
97118
--- The optional parameters of MakersFee.
98119
--- @shape OptionalParametersOf_MakersFee
99120
--- @field market string | nil The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.

src/command/sample/command-production.sample.ts

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19610,6 +19610,45 @@ export const commandProductionSample: CommandRaw[] = [
1961019610
],
1961119611
"ChangeTypes": []
1961219612
},
19613+
{
19614+
"CommandName": "GetAccountMarkets",
19615+
"Parameters": [
19616+
{
19617+
"Index": 0,
19618+
"Name": "accountId",
19619+
"Type": 0,
19620+
"IsRequired": false,
19621+
"IsHidden": false,
19622+
"IsField": false,
19623+
"AllowNull": false,
19624+
"Description": "The guid returned by AccountGuid(), InputAccount or InputAccountMarket for example.",
19625+
"ScriptType": null,
19626+
"Suggestion": [
19627+
3401,
19628+
3402,
19629+
3406,
19630+
3600
19631+
]
19632+
}
19633+
],
19634+
"Command": 7223,
19635+
"CommandType": 1,
19636+
"Category": 37,
19637+
"Description": "An array of markets affiliated with a particular account.",
19638+
"ReturnDescription": "Returns an array with all the markets as a string.",
19639+
"OutputIndex": [],
19640+
"IsConstant": false,
19641+
"IsPrimary": true,
19642+
"RequiresCall": false,
19643+
"Resizable": false,
19644+
"OutputHidden": false,
19645+
"OutputType": 4,
19646+
"OutputSuggestions": [
19647+
4406,
19648+
4403
19649+
],
19650+
"ChangeTypes": []
19651+
},
1961319652
{
1961419653
"CommandName": "GetAllFilledOrders",
1961519654
"Command": 5005,
@@ -20459,6 +20498,40 @@ export const commandProductionSample: CommandRaw[] = [
2045920498
],
2046020499
"ChangeTypes": []
2046120500
},
20501+
{
20502+
"CommandName": "GetExchangeMarkets",
20503+
"Parameters": [
20504+
{
20505+
"Index": 0,
20506+
"Name": "exchangeCode",
20507+
"Type": 0,
20508+
"IsRequired": true,
20509+
"IsHidden": false,
20510+
"IsField": false,
20511+
"AllowNull": false,
20512+
"Description": "The exchange code affiliated with the exchange.",
20513+
"ScriptType": null,
20514+
"Suggestion": []
20515+
}
20516+
],
20517+
"Command": 7222,
20518+
"CommandType": 1,
20519+
"Category": 37,
20520+
"Description": "An array of markets affiliated with a particular exchange.",
20521+
"ReturnDescription": "Returns an array with all the markets as a string.",
20522+
"OutputIndex": [],
20523+
"IsConstant": false,
20524+
"IsPrimary": true,
20525+
"RequiresCall": false,
20526+
"Resizable": false,
20527+
"OutputHidden": false,
20528+
"OutputType": 4,
20529+
"OutputSuggestions": [
20530+
4406,
20531+
4403
20532+
],
20533+
"ChangeTypes": []
20534+
},
2046220535
{
2046320536
"CommandName": "GetFailedOrderMessage",
2046420537
"Parameters": [
@@ -29293,6 +29366,64 @@ export const commandProductionSample: CommandRaw[] = [
2929329366
],
2929429367
"ChangeTypes": []
2929529368
},
29369+
{
29370+
"CommandName": "IsValidMarket",
29371+
"Parameters": [
29372+
{
29373+
"Index": 0,
29374+
"Name": "market",
29375+
"Type": 0,
29376+
"IsRequired": true,
29377+
"IsHidden": false,
29378+
"IsField": false,
29379+
"AllowNull": false,
29380+
"Description": "The market returned by PriceMarket(), InputAccountMarket() or InputMarket() for example.",
29381+
"ScriptType": null,
29382+
"Suggestion": [
29383+
3402,
29384+
3406,
29385+
3411,
29386+
3604
29387+
]
29388+
}
29389+
],
29390+
"Command": 7221,
29391+
"CommandType": 1,
29392+
"Category": 37,
29393+
"Description": "Checks if the input is a valid market.",
29394+
"ReturnDescription": "Returns true if the market is valid.",
29395+
"OutputIndex": [],
29396+
"IsConstant": false,
29397+
"IsPrimary": true,
29398+
"RequiresCall": false,
29399+
"Resizable": false,
29400+
"OutputHidden": false,
29401+
"OutputType": 3,
29402+
"OutputSuggestions": [
29403+
3211,
29404+
3210,
29405+
3206,
29406+
3300,
29407+
6019,
29408+
3303,
29409+
3302,
29410+
3301,
29411+
3801,
29412+
3802,
29413+
3800,
29414+
3804,
29415+
3803,
29416+
7400,
29417+
7406,
29418+
7404,
29419+
7405,
29420+
7401,
29421+
7403,
29422+
7402,
29423+
7407
29424+
],
29425+
"ChangeTypes": []
29426+
},
2929629427
{
2929729428
"CommandName": "KAMA",
2929829429
"Parameters": [

0 commit comments

Comments
 (0)