-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDataStructures.cs
More file actions
1387 lines (1038 loc) · 38.5 KB
/
Copy pathDataStructures.cs
File metadata and controls
1387 lines (1038 loc) · 38.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#region License
/*
This file is part of TkApi.NET project.
TkApi.NET is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TkApi.NET is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with TkApi.NET. If not, see <http://www.gnu.org/licenses/>.
Copyright (c) 2011-2012, Michael D. Spradling (mike@mspradling.com)
*/
#endregion
using System;
using Newtonsoft.Json;
using System.Reflection;
namespace TkApi
{
#region JSON.NET Converters
internal class ObjectSometimesArrayConverter<T>: JsonConverter
{
public override bool CanConvert(Type objectType)
{
return (objectType == typeof(T)) || (objectType == typeof(T[]));
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
if (reader.TokenType == JsonToken.StartArray)
{
T[] s = serializer.Deserialize<T[]>(reader);
return s;
}
else
{
T s = serializer.Deserialize<T>(reader);
return new T[] { s };
}
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
throw new NotImplementedException();
}
}
#endregion
namespace DataStructures {
public enum AccountsHistory_Range {
All,
Today,
Current_Week,
Current_Month,
Last_Month
}
public enum AccountsHistory_Transactions {
All,
Bookkeeping,
Trade
}
public class TKBaseType {
[JsonProperty("@id")]
public string Id { get; set; }
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("description")]
public string Description { get; set; }
[JsonProperty("path")]
public string Path { get; set; }
[JsonProperty("error")] // Some errors are here
public string Error { get; set; }
public static bool operator ==(TKBaseType lhs, TKBaseType rhs) {
if (ReferenceEquals(lhs, rhs)) return true;
// Cast to object to prevent recursion
if ((object)lhs == null || (object)rhs == null) return false;
return lhs.Equals(rhs);
}
public static bool operator !=(TKBaseType lhs, TKBaseType rhs) {
return !(lhs == rhs);
}
public override bool Equals(object obj) {
if (obj == null) return false; // Must be here to adhere to Microsoft's standard for overriding Equals
if (obj.GetType() != this.GetType()) return false; // Are they the same object type
bool equal = true;
foreach (PropertyInfo myPropertyInfo in this.GetType().GetProperties()) {
// Skip Id. This is unique for every transaction
if (myPropertyInfo.Name != "Id") {
foreach (PropertyInfo objPropertyInfo in obj.GetType().GetProperties()) {
if (myPropertyInfo.Name == objPropertyInfo.Name) {
object myProp = myPropertyInfo.GetValue(this, null);
object objProp = objPropertyInfo.GetValue(obj, null);
if (myProp != null && objProp != null) {
equal = myProp.ToString() == objProp.ToString();
} else if (myProp == null && objProp == null) {
// Do nothing
} else {
equal = false;
}
if (!equal) break;
}
}
if (!equal) break;
}
}
return equal;
}
}
public class Accounts: TKBaseType {
[JsonProperty("accounts")]
public TAccounts Accounts2 { get; set; }
public class TAccounts {
[JsonProperty("accountsummary")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<TAccountSummary>))]
public TAccountSummary[] AccountSummary { get; set; }
public class TAccountSummary {
[JsonProperty("account")]
public string Account { get; set; }
[JsonProperty("accountbalance")]
public TAccountBalance AccountBalance { get; set; }
public class TAccountBalance {
[JsonProperty("account")]
public string Account { get; set; }
[JsonProperty("accountvalue")]
public string AccountValue { get; set; }
[JsonProperty("cashbalance")]
public string CashBalance { get; set; }
[JsonProperty("cashmv")]
public string cashmv { get; set; }
[JsonProperty("fedcall")]
public string FedCall { get; set; }
[JsonProperty("housecall")]
public string HouseCall { get; set; }
[JsonProperty("marginbalance")]
public string MarginBalance { get; set; }
[JsonProperty("marginmv")]
public string MarginMv { get; set; }
[JsonProperty("money")]
public TMoney Money;
public class TMoney {
[JsonProperty("accruedinterest")]
public string AccruedInterest { get; set; }
[JsonProperty("cash")]
public string Cash { get; set; }
[JsonProperty("cashavailable")]
public string CashAvailable { get; set; }
[JsonProperty("marginbalance")]
public string MarginBalance { get; set; }
[JsonProperty("mmf")]
public string Mmf { get; set; }
[JsonProperty("total")]
public string Total { get; set; }
[JsonProperty("uncleareddeposits")]
public string UnclearedDeposits { get; set; }
[JsonProperty("unsettledfunds")]
public string UnsettledFunds { get; set; }
[JsonProperty("yield")]
public string Yield { get; set; }
}
[JsonProperty("openbuyvalue")]
public string OpenBuyValue { get; set; }
[JsonProperty("securities")]
public TSecurities Security;
public class TSecurities {
[JsonProperty("longoptions")]
public string LongOptions { get; set; }
[JsonProperty("longstocks")]
public string LongStocks { get; set; }
[JsonProperty("options")]
public string Options { get; set; }
[JsonProperty("shortoptions")]
public string ShortOptions { get; set; }
[JsonProperty("shortstocks")]
public string ShortStocks { get; set; }
[JsonProperty("stocks")]
public string Stocks { get; set; }
[JsonProperty("total")]
public string Total { get; set; }
}
[JsonProperty("shortbalance")]
public string ShortBalance { get; set; }
[JsonProperty("shortmv")]
public string ShortMv { get; set; }
}
[JsonProperty("accountholdings")]
public TAccountHoldings AccountHoldings { get; set; }
public class TAccountHoldings {
[JsonProperty("displaydata")]
public TDisplayData DisplayData { get; set; }
public class TDisplayData {
[JsonProperty("totalsecurities")]
public string TotalSecurities { get; set; }
}
[JsonProperty("holding")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<THolding>))]
public THolding[] Holdings { get; set; }
public class THolding {
[JsonProperty("accounttype")]
public string AccountType { get; set; }
[JsonProperty("costbasis")]
public string CostBasis { get; set; }
[JsonProperty("displaydata")]
public TDisplayData DisplayData { get; set; }
public class TDisplayData {
[JsonProperty("accounttype")]
public string AccountType { get; set; }
[JsonProperty("assetclass")]
public string AssetClass { get; set; }
[JsonProperty("change")]
public string Change { get; set; }
[JsonProperty("costbasis")]
public string CostBasis { get; set; }
[JsonProperty("desc")]
public string Desc { get; set; }
[JsonProperty("lastprice")]
public string LastPrice { get; set; }
[JsonProperty("marketvalue")]
public string MarketValue { get; set; }
[JsonProperty("marketvaluechange")]
public string MarketValueChange { get; set; }
[JsonProperty("qty")]
public string Qty { get; set; }
[JsonProperty("symbol")]
public string Symbol { get; set; }
}
[JsonProperty("gainloss")]
public string GainLoss { get; set; }
[JsonProperty("instrument")]
public TInstrument Instrument { get; set; }
public class TInstrument {
[JsonProperty("cusip")]
public string CusIp { get; set; }
[JsonProperty("desc")]
public string Desc { get; set; }
[JsonProperty("factor")]
public string Factor { get; set; }
[JsonProperty("matdt")]
public string MatDt { get; set; }
[JsonProperty("mmy")]
public string Mmy { get; set; }
[JsonProperty("mult")]
public string Mult { get; set; }
[JsonProperty("sectyp")]
public string SECTyp { get; set; }
[JsonProperty("strkpx")]
public string StrkPx { get; set; }
[JsonProperty("sym")]
public string Sym { get; set; }
}
[JsonProperty("marketvalue")]
public string MarketValue { get; set; }
[JsonProperty("marketvaluechange")]
public string MarketValueChange { get; set; }
[JsonProperty("price")]
public string Price { get; set; }
[JsonProperty("purchaseprice")]
public string PurchasePrice { get; set; }
[JsonProperty("qty")]
public string Qty { get; set; }
[JsonProperty("quote")]
public TQuote Quote { get; set; }
public class TQuote {
[JsonProperty("change")]
public string Change { get; set; }
[JsonProperty("lastprice")]
public string LastPrice { get; set; }
}
[JsonProperty("underlying")]
public string Underlying { get; set; }
}
[JsonProperty("totalsecurities")]
public string TotalSecurities { get; set; }
}
}
}
}
public class AccountsBalance: TKBaseType {
[JsonProperty("accountbalance")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<TAccountBalance>))]
public TAccountBalance[] AccountBalance { get; set; }
public class TAccountBalance {
[JsonProperty("account")]
public string AccountNumber { get; set; }
[JsonProperty("accountname")]
public string AccountName { get; set; }
[JsonProperty("accountvalue")]
public string AccountValue { get; set; }
}
[JsonProperty("totalbalance")]
public TTotalBalance TotalBalance { get; set; }
public class TTotalBalance {
[JsonProperty("accountvalue")]
public string AccountValue { get; set; }
}
}
public class AccountsSingle : TKBaseType {
[JsonProperty("accountbalance")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<Accounts.TAccounts.TAccountSummary.TAccountBalance>))]
public Accounts.TAccounts.TAccountSummary.TAccountBalance[] AccountBalance { get; set; }
[JsonProperty("accountholdings")]
public Accounts.TAccounts.TAccountSummary.TAccountHoldings AccountHoldings { get; set; }
}
public class AccountsBalancesSingle: TKBaseType {
[JsonProperty("accountbalance")]
public Accounts.TAccounts.TAccountSummary.TAccountBalance AccountBalance { get; set; }
}
public class AccountsHistory: TKBaseType {
[JsonProperty("totalrows")]
public string TotalRows { get; set; }
[JsonProperty("transactions")]
public TTransactions Transactions { get; set; }
public class TTransactions
{
[JsonProperty("transaction")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<TTransaction>))]
public TTransaction[] Transaction { get; set; }
public class TTransaction
{
[JsonProperty("activity")]
public string Activity { get; set; }
[JsonProperty("amount")]
public string Amount { get; set; }
[JsonProperty("date")]
public string Date { get; set; }
[JsonProperty("desc")]
public string Desc { get; set; }
[JsonProperty("symbol")]
public string Symbol { get; set; }
[JsonProperty("transaction")]
public TTTransaction Transaction { get; set; }
public class TTTransaction
{
[JsonProperty("accounttype")]
public string AccountType { get; set; }
[JsonProperty("commission")]
public string Commission { get; set; }
[JsonProperty("description")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<string>))]
public string[] Description { get; set; }
[JsonProperty("fee")]
public string Fee { get; set; }
[JsonProperty("price")]
public string Price { get; set; }
[JsonProperty("quantity")]
public string Quantity { get; set; }
[JsonProperty("secfee")]
public string SECFee { get; set; }
[JsonProperty("security")]
public TSecurity Security { get; set; }
public class TSecurity {
[JsonProperty("cusip")]
public string CusIp { get; set; }
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("sectyp")]
public string SECTyp { get; set; }
[JsonProperty("sym")]
public string Symbol { get; set; }
}
[JsonProperty("settlementdate")]
public string SettlementDate { get; set; }
[JsonProperty("side")]
public string Side { get; set; }
[JsonProperty("source")]
public string Source { get; set; }
[JsonProperty("tradedate")]
public string TradeDate { get; set; }
[JsonProperty("transactionid")]
public string TransactionId { get; set; }
}
}
}
}
public class AccountsHoldings: TKBaseType {
[JsonProperty("accountholdings")]
public TAccountHoldings AccountHoldings{ get; set; }
public class TAccountHoldings {
[JsonProperty("holding")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<Accounts.TAccounts.TAccountSummary.TAccountHoldings.THolding>))]
public Accounts.TAccounts.TAccountSummary.TAccountHoldings.THolding[] Holdings { get; set; }
}
}
public class Orders: TKBaseType {
[JsonProperty("orderstatus")]
public TOrderStatus OrderStatus { get; set; }
public class TOrderStatus {
[JsonProperty("order")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<TOrder>))]
public TOrder[] Order { get; set; }
public class TOrder {
[JsonProperty("fixmlmessage")]
public string FixmlMessage { get; set; }
}
}
}
public class OrdersPost: TKBaseType {
[JsonProperty("clientorderid")]
public string ClientOrderId { get; set; }
[JsonProperty("orderstatus")]
public string OrderStatus { get; set; }
[JsonProperty("warning")]
public TWarning Warning { get; set; }
public class TWarning {
[JsonProperty("warningcode")]
public string WarningCode { get; set; }
[JsonProperty("warningtext")]
public string WarningText { get; set; }
}
[JsonProperty("estcommission")]
public string EstCommission { get; set; }
[JsonProperty("marginrequirement")]
public string MarginRequirement { get; set; }
[JsonProperty("netamt")]
public string NetAmt { get; set; }
[JsonProperty("principal")]
public string Principal { get; set; }
[JsonProperty("quotes")]
Quotess.TQuotes Quotes { get; set; }
[JsonProperty("secfee")]
public string SecFee { get; set; }
}
public class MarketClock: TKBaseType {
[JsonProperty("date")]
public string Date { get; set; }
[JsonProperty("status")]
public TStatus Status { get; set; }
public class TStatus {
[JsonProperty("current")]
public string Current { get; set; }
}
[JsonProperty("message")]
public string Message { get; set; }
[JsonProperty("unixtime")]
public string UnixTime { get; set; }
}
public class MarketExtQuotes: TKBaseType {
[JsonProperty("quotes")]
public TQuotes Quotes { get; set; }
public class TQuotes {
[JsonProperty("quote")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<TQuote>))]
public TQuote[] Quote { get; set; }
public class TQuote {
[JsonProperty("adp_100")]
public string adp_100 { get; set; }
[JsonProperty("adp_200")]
public string adp_200 { get; set; }
[JsonProperty("adp_50")]
public string adp_50 { get; set; }
[JsonProperty("adv_21")]
public string adv_21 { get; set; }
[JsonProperty("adv_30")]
public string adv_30 { get; set; }
[JsonProperty("adv_90")]
public string adv_90 { get; set; }
[JsonProperty("ask")]
public string ask { get; set; }
[JsonProperty("ask_time")]
public string ask_time { get; set; }
[JsonProperty("asksz")]
public string asksz { get; set; }
[JsonProperty("basis")]
public string basis { get; set; }
[JsonProperty("beta")]
public string beta { get; set; }
[JsonProperty("bid")]
public string bid { get; set; }
[JsonProperty("bid_time")]
public string bid_time { get; set; }
[JsonProperty("bidsz")]
public string bidsz { get; set; }
[JsonProperty("bidtick")]
public string bidtick { get; set; }
[JsonProperty("chg")]
public string chg { get; set; }
[JsonProperty("chg_sign")]
public string chg_sign { get; set; }
[JsonProperty("chg_t")]
public string chg_t { get; set; }
[JsonProperty("cl")]
public string cl { get; set; }
[JsonProperty("contract_size")]
public string contract_size { get; set; }
[JsonProperty("cusip")]
public string cusip { get; set; }
[JsonProperty("date")]
public string date { get; set; }
[JsonProperty("datetime")]
public string datetime { get; set; }
[JsonProperty("days_to_expiration")]
public string days_to_expiration { get; set; }
[JsonProperty("div")]
public string div { get; set; }
[JsonProperty("divexdate")]
public string divexdate { get; set; }
[JsonProperty("divfreq")]
public string divfreq { get; set; }
[JsonProperty("divpaydt")]
public string divpaydt { get; set; }
[JsonProperty("dollar_value")]
public string dollar_value { get; set; }
[JsonProperty("eps")]
public string eps { get; set; }
[JsonProperty("exch")]
public string exch { get; set; }
[JsonProperty("exch_desc")]
public string exch_desc { get; set; }
[JsonProperty("hi")]
public string hi { get; set; }
[JsonProperty("iad")]
public string iad { get; set; }
[JsonProperty("idelta")]
public string idelta { get; set; }
[JsonProperty("igamma")]
public string igamma { get; set; }
[JsonProperty("imp_volatility")]
public string imp_volatility { get; set; }
[JsonProperty("incr_vl")]
public string incr_vl { get; set; }
[JsonProperty("irho")]
public string irho { get; set; }
[JsonProperty("issue_desc")]
public string issue_desc { get; set; }
[JsonProperty("itheta")]
public string itheta { get; set; }
[JsonProperty("ivega")]
public string ivega { get; set; }
[JsonProperty("last")]
public string last { get; set; }
[JsonProperty("lo")]
public string lo { get; set; }
[JsonProperty("name")]
public string name { get; set; }
[JsonProperty("op_delivery")]
public string op_delivery { get; set; }
[JsonProperty("op_flag")]
public string op_flag { get; set; }
[JsonProperty("op_style")]
public string op_style { get; set; }
[JsonProperty("op_subclass")]
public string op_subclass { get; set; }
[JsonProperty("openinterest")]
public string openinterest { get; set; }
[JsonProperty("opn")]
public string opn { get; set; }
[JsonProperty("opt_val")]
public string opt_val { get; set; }
[JsonProperty("pchg")]
public string pchg { get; set; }
[JsonProperty("pchg_sign")]
public string pchg_sign { get; set; }
[JsonProperty("pcls")]
public string pcls { get; set; }
[JsonProperty("pe")]
public string pe { get; set; }
[JsonProperty("phi")]
public string phi { get; set; }
[JsonProperty("plo")]
public string plo { get; set; }
[JsonProperty("popn")]
public string popn { get; set; }
[JsonProperty("pr_adp_100")]
public string pr_adp_100 { get; set; }
[JsonProperty("pr_adp_200")]
public string pr_adp_200 { get; set; }
[JsonProperty("pr_adp_50")]
public string pr_adp_50 { get; set; }
[JsonProperty("pr_date")]
public string pr_date { get; set; }
[JsonProperty("pr_openinterest")]
public string pr_openinterest { get; set; }
[JsonProperty("prbook")]
public string prbook { get; set; }
[JsonProperty("prchg")]
public string prchg { get; set; }
[JsonProperty("prem_mult")]
public string prem_mult { get; set; }
[JsonProperty("put_call")]
public string put_call { get; set; }
[JsonProperty("pvol")]
public string pvol { get; set; }
[JsonProperty("qcond")]
public string qcond { get; set; }
[JsonProperty("rootsymbol")]
public string rootsymbol { get; set; }
[JsonProperty("secclass")]
public string secclass { get; set; }
[JsonProperty("sesn")]
public string sesn { get; set; }
[JsonProperty("sho")]
public string sho { get; set; }
[JsonProperty("strikeprice")]
public string strikeprice { get; set; }
[JsonProperty("symbol")]
public string symbol { get; set; }
[JsonProperty("tcond")]
public string tcond { get; set; }
[JsonProperty("timestamp")]
public string timestamp { get; set; }
[JsonProperty("tr_num")]
public string tr_num { get; set; }
[JsonProperty("tradetick")]
public string tradetick { get; set; }
[JsonProperty("trend")]
public string trend { get; set; }
[JsonProperty("under_cusip")]
public string under_cusip { get; set; }
[JsonProperty("undersymbol")]
public string undersymbol { get; set; }
[JsonProperty("vl")]
public string vl { get; set; }
[JsonProperty("volatility12")]
public string volatility12 { get; set; }
[JsonProperty("vwap")]
public string vwap { get; set; }
[JsonProperty("wk52hi")]
public string wk52hi { get; set; }
[JsonProperty("wk52hidate")]
public string wk52hidate { get; set; }
[JsonProperty("wk52lo")]
public string wk52lo { get; set; }
[JsonProperty("wk52lodate")]
public string wk52lodate { get; set; }
[JsonProperty("xdate")]
public string xdate { get; set; }
[JsonProperty("xday")]
public string xday { get; set; }
[JsonProperty("xmonth")]
public string xmonth { get; set; }
[JsonProperty("xyear")]
public string xyear { get; set; }
[JsonProperty("yield")]
public string yield { get; set; }
}
}
}
public class MarketOptionsStrikes: TKBaseType {
[JsonProperty("prices")]
public TPrices Prices { get; set; }
public class TPrices {
[JsonProperty("price")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<string>))]
public string[] Price { get; set; }
}
}
public class MarketOptionsExpirations: TKBaseType {
[JsonProperty("expirationdates")]
public TExpirationDates ExpirationDates { get; set; }
public class TExpirationDates {
[JsonProperty("date")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<string>))]
public string[] Date { get; set; }
}
}
public class Quotess: TKBaseType {
[JsonProperty("quotes")]
public TQuotes Quotes { get; set; }
public class TQuotes
{
[JsonProperty("instrumentquote")]
[JsonConverter(typeof(ObjectSometimesArrayConverter<TInstrumentQuote>))]
public TInstrumentQuote[] InstrumentQuote { get; set; }
public class TInstrumentQuote
{
[JsonProperty("displaydata")]
public TDisplayData DisplayData { get; set; }
public class TDisplayData {
[JsonProperty("askprice")]
public string AskPrice { get; set; }
[JsonProperty("asksize")]
public string AskSize { get; set; }
[JsonProperty("bidprice")]
public string BidPrice { get; set; }
[JsonProperty("bidsize")]
public string BidSize { get; set; }
[JsonProperty("change")]
public string Change { get; set; }
[JsonProperty("contracthigh")]
public string ContractHigh { get; set; }
[JsonProperty("contractlow")]
public string ContractLow { get; set; }
[JsonProperty("contractsize")]
public string ContractSize { get; set; }
[JsonProperty("delta")]
public string Delta { get; set; }
[JsonProperty("desc")]
public string Desc { get; set; }
[JsonProperty("dividendamount")]
public string DividendAmount { get; set; }
[JsonProperty("dividendexdate")]
public string DividendExDate { get; set; }
[JsonProperty("dividendpaydate")]
public string DividendPayDate { get; set; }
[JsonProperty("dividendyield")]
public string DividendYield { get; set; }
[JsonProperty("earningspershare")]
public string EarningsPerShare { get; set; }
[JsonProperty("exch")]
public string Exch { get; set; }
[JsonProperty("expiry")]
public string Expiry { get; set; }
[JsonProperty("gamma")]
public string Gamma { get; set; }
[JsonProperty("high52price")]
public string High52Price { get; set; }
[JsonProperty("highprice")]
public string HighPrice { get; set; }
[JsonProperty("impvolatility")]
public string ImpVolatility { get; set; }
[JsonProperty("lastclosingprice")]
public string LastClosingPrice { get; set; }
[JsonProperty("lastprice")]
public string LastPrice { get; set; }
[JsonProperty("low52price")]
public string Low52Price { get; set; }
[JsonProperty("lowprice")]
public string LowPrice { get; set; }
[JsonProperty("nav")]
public string Nav { get; set; }
[JsonProperty("openinterest")]
public string OpenInterest { get; set; }
[JsonProperty("openprice")]
public string OpenPrice { get; set; }
[JsonProperty("optval")]
public string OptVal { get; set; }
[JsonProperty("optiontype")]
public string OptionType { get; set; }
[JsonProperty("pctchange")]
public string PctChange { get; set; }
[JsonProperty("priceearningsratio")]
public string PriceEarningsRatio { get; set; }
[JsonProperty("rho")]
public string Rho { get; set; }
[JsonProperty("sessionvolume")]
public string SessionVolume { get; set; }