本帖最后由 Jack2005 于 2023-7-24 20:08 编辑
获取交易所币种价格,当前默认了部分的币种,支持添加获取,留给能看懂有需要的朋友 ,
论坛限制上传文件大小 ,已经提供下载连接,
[C#] 纯文本查看 复制代码 public void dataCenter(string result, string strTtype, string strNext)
{
if (string.IsNullOrEmpty(result)) { return; }
var templistdata = new MyClassDexscreener();
try
{
templistdata = System.Text.Json.JsonSerializer.Deserialize<MyClassDexscreener>(result);
}
catch (Exception ex)
{
_log.Error(ex, $"解析错误:{ex.Message}");
}
if (templistdata.pairs is null)
{
return;
}
foreach (var item in templistdata.pairs)
{
try
{
string currencyTemp = $"{item.baseToken.symbol}";
//string currencyTemp = $"{item.baseToken.symbol}_{item.quoteToken.symbol}";
if (currencyTemp.ToUpper().Contains("USDT"))
{
_log.Debug($"跳过:{currencyTemp}\t{item.baseToken.address ?? "address is Null"}\t");
continue;
}
var tempdata = item.baseToken.address;
if (string.IsNullOrEmpty(tempdata))
{
continue;
}
string token = tempdata.ToString();
tempdata = item.priceUsd;
if (string.IsNullOrEmpty(tempdata))
{
continue;
}
tempdata = item.priceUsd;
decimal prices = MyDataValueChage.ChangeDataToD(tempdata.ToString());
lock (_objLock)
{
try
{
_tempResultDic.Add(token, new MyClassDextoolsB
{
currency = currencyTemp,
address = token,
price = prices
});
_Count++;
_log.Debug($"抓\t{token}\t{currencyTemp}\t{prices}\t成功次数:{_Count}");
if (result.Length > 50)
{
Task.Run(() =>
{
sSaveType(token, strTtype);
});
}
else
{
Task.Run(() =>
{
if (strNext == "0")
{
sSaveType(tempdata, "NUll");
}
else
{
sSaveType(tempdata, strNext);
}
});
}
}
catch (Exception ex)
{
//_log.Error(ex,$"币种添加失败,{ex.Message}");
Task.Run(() =>
{
sSaveType(tempdata, strNext);
});
}
}
}
catch (Exception ex)
{
_log.Error(ex, "select Data " + ex.Message);
}
}
}
[C#] 纯文本查看 复制代码 $2023-07-24 19:30:12.7798 DataCapture.Win_GetDatas::增幅率:-0.28546959748786754% 原0.3503 新0.3493
$2023-07-24 19:30:12.7798 DataCapture.Win_GetDatas::增幅率:0.14204545454545456% 原0.2112 新0.2115
$2023-07-24 19:30:12.7867 DataCapture.Win_GetDatas::增幅率:0.1658374792703151% 原0.00603 新0.00604
$2023-07-24 19:30:12.7867 DataCapture.Win_GetDatas::增幅率:-1.1285266457680252% 原0.00001595 新0.00001577
$2023-07-24 19:30:12.7867 DataCapture.Win_GetDatas::增幅率:-4.081632653061225% 原0.00049 新0.00047
$2023-07-24 19:30:12.7867 DataCapture.Win_GetDatas::增幅率:0.15% 原0.06 新0.06009
$2023-07-24 19:30:12.7867 DataCapture.Win_GetDatas::增幅率:0.9900990099009901% 原0.000101 新0.000102
$2023-07-24 19:30:12.8048 DataCapture.Win_GetDatas::增幅率:-0.5405405405405405% 原0.74 新0.736
$2023-07-24 19:30:12.8048 DataCapture.Win_GetDatas::增幅率:-0.2849002849002849% 原0.2457 新0.245
$2023-07-24 19:30:12.8048 DataCapture.Win_GetDatas::增幅率:0.09551098376313277% 原0.1047 新0.1048
$2023-07-24 19:30:12.8048 DataCapture.Win_GetDatas::增幅率:-0.1119430525599285% 原24.3874 新24.3601
$2023-07-24 19:30:12.8211 DataCapture.Win_GetDatas::增幅率:-0.5568445475638052% 原0.2155 新0.2143
$2023-07-24 19:30:12.8211 DataCapture.Win_GetDatas::增幅率:-0.1266784899923993% 原3.947 新3.942
$2023-07-24 19:30:12.8211 DataCapture.Win_GetDatas::增幅率:0.24509803921568626% 原0.0408 新0.0409
$2023-07-24 19:30:12.8211 DataCapture.Win_GetDatas::增幅率:-0.15560165975103735% 原1.928 新1.925
$2023-07-24 19:30:12.8362 DataCapture.Win_GetDatas::增幅率:0.746268656716418% 原0.0402 新0.0405
$2023-07-24 19:30:12.8362 DataCapture.Win_GetDatas::增幅率:-0.1680672268907563% 原0.595 新0.594
$2023-07-24 19:30:12.8362 DataCapture.Win_GetDatas::增幅率:-0.15011258443832873% 原0.007994 新0.007982
$2023-07-24 19:30:12.8362 DataCapture.Win_GetDatas::增幅率:0.014550279036802819% 原0.00639163 新0.00639256
$2023-07-24 19:30:12.8518 DataCapture.Win_GetDatas::增幅率:0.25351463470845814% 原0.004339 新0.00435
$2023-07-24 19:30:12.8518 DataCapture.Win_GetDatas::增幅率:-7.6923076923076925% 原0.0013 新0.0012
$2023-07-24 19:30:12.8518 DataCapture.Win_GetDatas::增幅率:0.9803921568627451% 原0.0102 新0.0103
$2023-07-24 19:30:12.8518 DataCapture.Win_GetDatas::增幅率:0.1455908246949444% 原0.00291914 新0.00292339
$2023-07-24 19:30:12.8674 DataCapture.Win_GetDatas::增幅率:-0.14587892049598836% 原0.1371 新0.1369
$2023-07-24 19:30:12.8674 DataCapture.Win_GetDatas::增幅率:0.13262599469496023% 原1.508 新1.51
$2023-07-24 19:30:12.8674 DataCapture.Win_GetDatas::增幅率:0.38910505836575876% 原0.00257 新0.00258
$2023-07-24 19:30:12.8803 DataCapture.Win_GetDatas::增幅率:-0.48309178743961356% 原0.0207 新0.0206
$2023-07-24 19:30:12.8803 DataCapture.Win_GetDatas::增幅率:-0.5689900426742532% 原70.3 新69.9
$2023-07-24 19:30:12.9030 DataCapture.Win_GetDatas::增幅率:-0.12987012987012989% 原0.308 新0.3076
$2023-07-24 19:30:12.9134 DataCapture.Win_GetDatas::增幅率:-0.411522633744856% 原0.972 新0.968
$2023-07-24 19:30:12.9134 DataCapture.Win_GetDatas::增幅率:-0.3401360544217687% 原5.88 新5.86
$2023-07-24 19:30:12.9342 DataCapture.Win_GetDatas::增幅率:-0.24660912453760786% 原0.00003244 新0.00003236
$2023-07-24 19:30:12.9439 DataCapture.Win_GetDatas::增幅率:-0.22796352583586627% 原13.16 新13.13
$2023-07-24 19:30:12.9439 DataCapture.Win_GetDatas::增幅率:0.044218439089100156% 原9.046 新9.05
$2023-07-24 19:30:12.9653 DataCapture.Win_GetDatas::增幅率:0.16181229773462782% 原6.18 新6.19
$2023-07-24 19:30:12.9763 DataCapture.Win_GetDatas::增幅率:-0.04180602006688963% 原239.2 新239.1
$2023-07-24 19:30:12.9763 DataCapture.Win_GetDatas::增幅率:0.6278386321132782% 原0.07486 新0.07533
$2023-07-24 19:30:12.9970 DataCapture.Win_GetDatas::增幅率:-0.013344008540165467% 原0.7494 新0.7493
$2023-07-24 19:30:12.9970 DataCapture.Win_GetDatas::增幅率:-0.2401921537229784% 原1.249 新1.246
$2023-07-24 19:30:13.0100 DataCapture.Win_GetDatas::增幅率:-0.6916663551052454% 原2.6747 新2.6562
$2023-07-24 19:30:13.0100 DataCapture.Win_GetDatas::增幅率:7.142857142857143% 原0.0028 新0.003
$2023-07-24 19:30:13.0100 DataCapture.Win_GetDatas::增幅率:-0.47451028105608956% 原8.219 新8.18
$2023-07-24 19:30:13.0100 DataCapture.Win_GetDatas::增幅率:0.38027943792600294% 原40.0232 新40.1754
$2023-07-24 19:30:13.0242 DataCapture.Win_GetDatas::增幅率:-0.19485357327067454% 原22.6837 新22.6395
$2023-07-24 19:30:13.0242 DataCapture.Win_GetDatas::增幅率:-0.0782122905027933% 原89.5 新89.43
$2023-07-24 19:30:13.0242 DataCapture.Win_GetDatas::增幅率:-0.2336448598130841% 原0.7276 新0.7259
$2023-07-24 19:30:13.0242 DataCapture.Win_GetDatas::增幅率:-1.112507688604819% 原3.7393 新3.6977
$2023-07-24 19:30:13.0385 DataCapture.Win_GetDatas::增幅率:-0.1792573623559539% 原0.3905 新0.3898
$2023-07-24 19:30:13.0385 DataCapture.Win_GetDatas::增幅率:-0.15748031496062995% 原0.0635 新0.0634
$2023-07-24 19:30:13.0385 DataCapture.Win_GetDatas::增幅率:0.031036623215394164% 原32.22 新32.23
$2023-07-24 19:30:13.0385 DataCapture.Win_GetDatas::增幅率:-0.34349506225848003% 原0.6987 新0.6963
$2023-07-24 19:30:13.0526 DataCapture.Win_GetDatas::增幅率:-0.5518087063151441% 原0.1631 新0.1622
$2023-07-24 19:30:13.0526 DataCapture.Win_GetDatas::增幅率:0.09188039797338093% 原761.86 新762.56
$2023-07-24 19:30:13.0526 DataCapture.Win_GetDatas::增幅率:-0.2537641684994079% 原5.911 新5.896
$2023-07-24 19:30:13.0687 DataCapture.Win_GetDatas::增幅率:-1.4492753623188406% 原0.138 新0.136
$2023-07-24 19:30:13.0687 DataCapture.Win_GetDatas::增幅率:0.21551724137931036% 原0.01392 新0.01395
$2023-07-24 19:30:13.0687 DataCapture.Win_GetDatas::增幅率:-0.3025651293688402% 原0.224745 新0.224065
$2023-07-24 19:30:13.0687 DataCapture.Win_GetDatas::增幅率:-0.5688282138794084% 原1.758 新1.748
$2023-07-24 19:30:13.0852 DataCapture.Win_GetDatas::增幅率:-0.7374631268436578% 原0.678 新0.673
$2023-07-24 19:30:13.0852 DataCapture.Win_GetDatas::增幅率:-0.1313197636244255% 原0.3046 新0.3042
$2023-07-24 19:30:13.0852 DataCapture.Win_GetDatas::增幅率:-0.07171029042667623% 原0.2789 新0.2787
$2023-07-24 19:30:13.0852 DataCapture.Win_GetDatas::增幅率:-0.17130360831004737% 原0.8231 新0.82169
$2023-07-24 19:30:13.1001 DataCapture.Win_GetDatas::增幅率:-0.34324942791762014% 原0.874 新0.871
$2023-07-24 19:30:13.1001 DataCapture.Win_GetDatas::增幅率:-0.23432923257176333% 原17.07 新17.03
$2023-07-24 19:30:13.1001 DataCapture.Win_GetDatas::增幅率:-0.25999350016249595% 原0.3077 新0.3069
$2023-07-24 19:30:13.1001 DataCapture.Win_GetDatas::增幅率:-0.41858518208455425% 原0.002389 新0.002379
$2023-07-24 19:30:13.1001 DataCapture.Win_GetDatas::增幅率:-1.0721465266919814% 原0.17908 新0.17716
$2023-07-24 19:30:13.1170 DataCapture.Win_GetDatas::增幅率:0.823045267489712% 原0.243 新0.245
$2023-07-24 19:30:13.1170 DataCapture.Win_GetDatas::增幅率:0.13763572411683744% 原0.6539 新0.6548
$2023-07-24 19:30:13.1170 DataCapture.Win_GetDatas::增幅率:-0.12706480304955528% 原0.0787 新0.0786
$2023-07-24 19:30:13.1170 DataCapture.Win_GetDatas::增幅率:-2.2375215146299485% 原0.1162 新0.1136
$2023-07-24 19:30:13.1315 DataCapture.Win_GetDatas::增幅率:-0.507013689369613% 原5.917 新5.887
$2023-07-24 19:30:13.1315 DataCapture.Win_GetDatas::增幅率:-0.15688232043213948% 原0.00112186 新0.0011201
$2023-07-24 19:30:13.1315 DataCapture.Win_GetDatas::增幅率:-0.39926800865080686% 原1.2022 新1.1974
$2023-07-24 19:30:13.1315 DataCapture.Win_GetDatas::增幅率:-0.48735912275357907% 原0.3283 新0.3267
$2023-07-24 19:30:13.1490 DataCapture.Win_GetDatas::增幅率:-0.28462998102466797% 原0.02108 新0.02102
$2023-07-24 19:30:13.1490 DataCapture.Win_GetDatas::增幅率:0.8368978984563884% 原0.005377 新0.005422
$2023-07-24 19:30:13.1490 DataCapture.Win_GetDatas::增幅率:0.008771833642174976% 原9.1201 新9.1209
$2023-07-24 19:30:13.1490 DataCapture.Win_GetDatas::增幅率:-0.582901554404145% 原30.88 新30.7
$2023-07-24 19:30:13.1616 DataCapture.Win_GetDatas::增幅率:-0.24125452352231605% 原0.829 新0.827
$2023-07-24 19:30:13.1616 DataCapture.Win_GetDatas::增幅率:0.038405735256464964% 原2.3434 新2.3443
$2023-07-24 19:30:13.1616 DataCapture.Win_GetDatas::增幅率:-0.02457727093983484% 原0.020344 新0.020339
$2023-07-24 19:30:13.1616 DataCapture.Win_GetDatas::增幅率:-0.6076975016880486% 原0.1481 新0.1472
$2023-07-24 19:30:13.1616 DataCapture.Win_GetDatas::增幅率:-0.13463480309660047% 原0.00002971 新0.00002967
$2023-07-24 19:30:13.1789 DataCapture.Win_GetDatas::增幅率:-0.4636459430979979% 原0.04745 新0.04723
$2023-07-24 19:30:13.1789 DataCapture.Win_GetDatas::增幅率:0.6637168141592921% 原0.000452 新0.000455
$2023-07-24 19:30:13.1789 DataCapture.Win_GetDatas::增幅率:-0.4484304932735426% 原0.0223 新0.0222
$2023-07-24 19:30:13.1789 DataCapture.Win_GetDatas::增幅率:0.04934859849980261% 原0.20264 新0.20274
$2023-07-24 19:30:13.1789 DataCapture.Win_GetDatas::增幅率:0.9410657569697682% 原0.008501 新0.008581
$2023-07-24 19:30:13.1946 DataCapture.Win_GetDatas::增幅率:-0.14684287812041116% 原0.0000681 新0.000068
$2023-07-24 19:30:13.1946 DataCapture.Win_GetDatas::增幅率:0.0907715582450832% 原0.3305 新0.3308
$2023-07-24 19:30:13.1946 DataCapture.Win_GetDatas::增幅率:-0.8517887563884157% 原0.0587 新0.0582
$2023-07-24 19:30:13.1946 DataCapture.Win_GetDatas::增幅率:-0.3737319807794981% 原0.01873 新0.01866
$2023-07-24 19:30:13.1946 DataCapture.Win_GetDatas::增幅率:0.30303030303030304% 原0.066 新0.0662
$2023-07-24 19:30:13.2113 DataCapture.Win_GetDatas::增幅率:-0.4932182490752158% 原0.01622 新0.01614
$2023-07-24 19:30:13.2113 DataCapture.Win_GetDatas::增幅率:-17.94871794871795% 原0.000975 新0.0008
$2023-07-24 19:30:13.5360 DataCapture.Win_GetDatas::增幅率:-0.09052845988457621% 原0.8837 新0.8829
$2023-07-24 19:30:13.5397 DataCapture.Win_GetDatas::增幅率:0.1614074731660076% 原0.024782 新0.024822
$2023-07-24 19:30:13.5397 DataCapture.Win_GetDatas::增幅率:-0.04927929037821855% 原0.08117 新0.08113
$2023-07-24 19:30:13.5397 DataCapture.Win_GetDatas::增幅率:0.22883295194508008% 原0.000874 新0.000876
$2023-07-24 19:30:13.5397 DataCapture.Win_GetDatas::增幅率:-0.00640291868554613% 原0.765276 新0.765227
$2023-07-24 19:30:13.5587 DataCapture.Win_GetDatas::增幅率:1.370851370851371% 原1.386 新1.405
$2023-07-24 19:30:13.5587 DataCapture.Win_GetDatas::增幅率:1.119703560496214% 原1.2414 新1.2553
$2023-07-24 19:30:13.5587 DataCapture.Win_GetDatas::增幅率:-0.1876172607879925% 原0.1066 新0.1064
$2023-07-24 19:30:13.5702 DataCapture.Win_GetDatas::增幅率:0.4291845493562232% 原0.0233 新0.0234
$2023-07-24 19:30:13.5702 DataCapture.Win_GetDatas::增幅率:0.0903342366757001% 原0.1107 新0.1108
$2023-07-24 19:30:13.5702 DataCapture.Win_GetDatas::增幅率:-3.090727816550349% 原0.001003 新0.000972
$2023-07-24 19:30:13.5702 DataCapture.Win_GetDatas::增幅率:0.1492537313432836% 原0.67 新0.671
$2023-07-24 19:30:13.5840 DataCapture.Win_GetDatas::增幅率:-0.6042296072507553% 原0.0993 新0.0987
$2023-07-24 19:30:13.5840 DataCapture.Win_GetDatas::增幅率:-0.37891836031691356% 原0.2903 新0.2892
$2023-07-24 19:30:13.5840 DataCapture.Win_GetDatas::增幅率:0.7334129285348798% 原0.5863 新0.5906
$2023-07-24 19:30:13.5840 DataCapture.Win_GetDatas::增幅率:-0.21413276231263384% 原0.000467 新0.000466
$2023-07-24 19:30:13.6008 DataCapture.Win_GetDatas::增幅率:-0.16827934371055953% 原23.77 新23.73
$2023-07-24 19:30:13.6008 DataCapture.Win_GetDatas::增幅率:-0.7104670793472144% 原2.8432 新2.823
$2023-07-24 19:30:13.6008 DataCapture.Win_GetDatas::增幅率:-2.7854454203262233% 原0.00003985 新0.00003874
$2023-07-24 19:30:13.6008 DataCapture.Win_GetDatas::增幅率:-0.2366863905325444% 原0.4225 新0.4215
$2023-07-24 19:30:13.6158 DataCapture.Win_GetDatas::增幅率:-0.8571428571428572% 原0.35 新0.347
$2023-07-24 19:30:13.6158 DataCapture.Win_GetDatas::增幅率:-0.11043622308117063% 原0.1811 新0.1809
$2023-07-24 19:30:13.6158 DataCapture.Win_GetDatas::增幅率:-0.24792622457018398% 原0.43158 新0.43051
$2023-07-24 19:30:13.6158 DataCapture.Win_GetDatas::增幅率:2.3923444976076556% 原0.000627 新0.000642
$2023-07-24 19:30:13.6158 DataCapture.Win_GetDatas::增幅率:-0.36939313984168864% 原0.01895 新0.01888
$2023-07-24 19:30:13.6322 DataCapture.Win_GetDatas::增幅率:-0.15614808372699782% 原0.050593 新0.050514
$2023-07-24 19:30:13.6322 DataCapture.Win_GetDatas::增幅率:-0.20792368795229918% 原34.5319 新34.4601
$2023-07-24 19:30:13.6322 DataCapture.Win_GetDatas::增幅率:-0.1884422110552764% 原0.001592 新0.001589
$2023-07-24 19:30:13.6322 DataCapture.Win_GetDatas::增幅率:-0.4027824781731176% 原57.0283 新56.7986
$2023-07-24 19:30:13.6322 DataCapture.Win_GetDatas::增幅率:-0.10277492291880781% 原0.07784 新0.07776
地址已更新,下载地址已包源码
下载地址已包含源码.zip
(207 Bytes, 下载次数: 16)
|