Вверх ↑
Ответов: 784
Рейтинг: 168
#1: 2021-07-12 20:58:44 ЛС | профиль | цитата
Pavel, может быть вам в этом направлении двигаться?
Add(MainForm,2953706,84,77)
{
Visible=1
link(onCreate,12356033:doString,[])
}
Add(LinkTip,4440906,315,56)
{
Link="https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md"
Font=[MS Sans Serif,8,0,16711680,1]
}
Add(LinkTip,2530333,315,77)
{
Link="https://stackoverflow.com/questions/48187292/powershell-script-restful-api-binance-uri-structure"
Font=[MS Sans Serif,8,0,16711680,1]
}
Add(LinkTip,4112222,315,98)
{
Link="https://blog.p-difm.com/new-order-with-api-binance-and-powershell/"
Font=[MS Sans Serif,8,0,16711680,1]
}
Add(LinkTip,5735257,315,119)
{
Link="https://blog.p-difm.com/interact-with-your-binance-account-using-the-api-and-powershell/"
Font=[MS Sans Serif,8,0,16711680,1]
}
Add(FormatStr,12356033,133,91)
{
Mask="function Get-Price{\r\n <#\r\n .SYNOPSIS\r\n Return the price of the symbol passed in paramater\r\n\r\n .PARAMETER Symbol\r\n Indicate the pair of which you wish to obtain the price\r\n \r\n .PARAMETER Decimal\r\n The number of decimal places in the price of the crypto\r\n\r\n .EXAMPLE\r\n Get-Price -Symbol CVCUSDT -Decimal 5\r\n\r\n .EXAMPLE\r\n $Tickers = Get-Price\r\n #>\r\n\r\n [cmdletbinding()]\r\n param(\r\n [Parameter(Mandatory=$false)] \r\n [string]$Symbol,\r\n\r\n [Parameter(Mandatory=$false)]\r\n [ValidateSet(0,1,2,3,4,5,6,7,8)]\r\n [string]$Decimal = 3\r\n )\r\n\r\n BEGIN{\r\n if($PSBoundParameters.ContainsKey('Symbol')){\r\n $URL = "https://api.binance.com/api/v3/ticker/price?symbol=" + $Symbol\r\n }\r\n else{\r\n $URL = "https://api.binance.com/api/v3/ticker/price"\r\n }\r\n }\r\n \r\n PROCESS{\r\n $Ticker = curl $URL -Method get \r\n $Ticker = $Ticker.Content | ConvertFrom-Json\r\n }\r\n\r\n END{\r\n if($PSBoundParameters.ContainsKey('Symbol')){\r\n return [math]::Round($Ticker.Price, $Decimal)\r\n }\r\n else{\r\n return $Ticker\r\n }\r\n }\r\n}\r\n\r\n\r\nGet-Price | Out-GridView -Wait"
link(onFString,1335603:doReplace,[])
}
Add(WinExec,2400366,231,77)
{
FileName="POWERSHELL"
Mode=0
Action="runas"
Point(doConsoleExec)
Point(onConsoleTerminate)
link(onConsoleTerminate,2953706:doClose,[(277,97)(277,69)(74,69)(74,104)])
}
Add(Replace,1335603,182,91)
{
SubStr="""
DestStr="'"
link(onReplace,2400366:doConsoleExec,[])
}


Тоже самое но на стандартных компонентах
Add(MainForm,2953706,35,105)
{
link(onCreate,572158:doDownload,[])
}
Add(HTTP_Get,572158,98,119)
{
URL="https://api.binance.com/api/v3/ticker/price"
link(onDownload,11088056:doConvert,[])
}
Add(StreamConvertor,11088056,154,126)
{
Mode=6
link(onResult,6921208:doSearch,[])
}
Add(BlockFind,6921208,217,126)
{
IncludeBlock=1
StartBlock="{"
EndBlock="}"
link(onSearch,15146236:doMTString,[])
}
Add(MTStrTbl,7276875,203,266)
{
Left=405
Top=210
Align=5
Name="asd"
Columns=#6:symbol|5:price|
link(CodePageSet,16214834:GetData,[])
}
Add(MST_RowAction,7049544,336,112)
{
MSTControl="asd"
}
Add(MT_String,15146236,280,112)
{
Delimeter=","
link(onResult,7049544:doRowAction,[])
}
Add(Replace,10639956,322,210)
{
SubStr="""
link(onReplace,16214834:doData,[(361,216)(361,202)(193,202)(193,216)])
}
Add(EventFromData,16214834,203,210)
{
link(onEvent,16522996:doSplit,[])
}
Add(StrPart,16522996,266,210)
{
Char=":"
link(onSplit,10639956:doReplace,[])
}

карма: 15

0
Редактировалось 1 раз(а), последний 2021-07-12 22:00:52