FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Bitmex.NET/Bitmex.NET.Example/MainWindow.xaml at master · semashkinvg/Bitmex.NET · GitHub
semashkinvg
/
Bitmex.NET
Public
Notifications
You must be signed in to change notification settings
Fork
24
Star
50
Code
Issues
6
Pull requests
9
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Bitmex.NET
/
Bitmex.NET.Example
/
MainWindow.xaml
Copy path
More file actions
More file actions
Latest commit
History
History
History
138 lines (135 loc) · 7.6 KB
Breadcrumbs
Bitmex.NET
/
Bitmex.NET.Example
/
MainWindow.xaml
Copy path
File metadata and controls
138 lines (135 loc) · 7.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<Windo
w
x
:Clas
s
=
"Bitmex.NET.Example.MainWindo
w
"
xmlns
=
"
http://schemas.microsoft.com/winfx/2006/xaml/presentation
"
xmlns
:
x
=
"
http://schemas.microsoft.com/winfx/2006/xaml
"
xmlns
:
d
=
"
http://schemas.microsoft.com/expression/blend/2008
"
xmlns
:
mc
=
"
http://schemas.openxmlformats.org/markup-compatibility/2006
"
xmlns
:
local
=
"
clr-namespace:Bitmex.NET.Example
"
xmlns
:
componentModel
=
"
clr-namespace:System.ComponentModel;assembly=WindowsBase
"
xmlns
:
models
=
"
clr-namespace:Bitmex.NET.Example.Models
"
mc
:
Ignorable
=
"
d
"
Title
=
"
Bitmex.NET Example
"
Height
=
"
600
"
Width
=
"
1024
"
>
<
Window
.Resources>
<
BooleanToVisibilityConverter
x
:
Key
=
"
BooleanToVisibilityConverter
"
></
BooleanToVisibilityConverter
>
<
CollectionViewSource
x
:
Key
=
"
SortedOrderBookL2Sourse
"
Source
=
"
{Binding OrderBookL2}
"
>
<
CollectionViewSource
.SortDescriptions>
<
componentModel
:
SortDescription
PropertyName
=
"
Price
"
Direction
=
"
Descending
"
/>
</
CollectionViewSource
.SortDescriptions>
</
CollectionViewSource
>
<
Style
x
:
Key
=
"
OrderBookItemContainerStyle
"
TargetType
=
"
{x:Type ListViewItem}
"
>
<
Style
.Triggers>
<
DataTrigger
Binding
=
"
{Binding Direction}
"
Value
=
"
Buy
"
>
<
Setter
Property
=
"
Foreground
"
Value
=
"
Green
"
></
Setter
>
</
DataTrigger
>
<
DataTrigger
Binding
=
"
{Binding Direction}
"
Value
=
"
Sell
"
>
<
Setter
Property
=
"
Foreground
"
Value
=
"
Red
"
></
Setter
>
</
DataTrigger
>
</
Style
.Triggers>
</
Style
>
</
Window
.Resources>
<
Grid
>
<
Grid
.RowDefinitions>
<
RowDefinition
Height
=
"
Auto
"
/>
<
RowDefinition
Height
=
"
Auto
"
/>
<
RowDefinition
Height
=
"
*
"
/>
</
Grid
.RowDefinitions>
<
GroupBox
Grid.Row=
"
0
"
Header
=
"
Authorization
"
Visibility
=
"
{Binding IsNotConnected,Converter={StaticResource BooleanToVisibilityConverter}}
"
>
<
Grid
>
<
Grid
.ColumnDefinitions>
<
ColumnDefinition
Width
=
"
Auto
"
/>
<
ColumnDefinition
Width
=
"
*
"
/>
</
Grid
.ColumnDefinitions>
<
Grid
.RowDefinitions>
<
RowDefinition
Height
=
"
Auto
"
/>
<
RowDefinition
Height
=
"
Auto
"
/>
<
RowDefinition
Height
=
"
Auto
"
/>
</
Grid
.RowDefinitions>
<
Label
Grid.Row=
"
0
"
Grid.Column=
"
0
"
Content
=
"
Key
"
></
Label
>
<
Label
Grid.Row=
"
1
"
Grid.Column=
"
0
"
Content
=
"
Secret
"
></
Label
>
<
TextBox
Grid.Row=
"
0
"
Grid.Column=
"
1
"
Text
=
"
{Binding Key, UpdateSourceTrigger=PropertyChanged}
"
VerticalAlignment
=
"
Center
"
></
TextBox
>
<
TextBox
Grid.Row=
"
1
"
Grid.Column=
"
1
"
Text
=
"
{Binding Secret, UpdateSourceTrigger=PropertyChanged}
"
VerticalAlignment
=
"
Center
"
></
TextBox
>
<
StackPanel
Grid.Row=
"
2
"
Grid.Column=
"
0
"
Grid.ColumnSpan=
"
2
"
Orientation
=
"
Horizontal
"
HorizontalAlignment
=
"
Center
"
Margin
=
"
10
"
>
<
Button
Content
=
"
Connect
"
HorizontalAlignment
=
"
Stretch
"
MinWidth
=
"
200
"
Command
=
"
{Binding StartLoadSymbolsCmd}
"
/>
</
StackPanel
>
</
Grid
>
</
GroupBox
>
<
GroupBox
Header
=
"
Trade (buy/sell example)
"
Grid.Row=
"
1
"
Visibility
=
"
{Binding IsConnected,Converter={StaticResource BooleanToVisibilityConverter}}
"
>
<
Grid
>
<
Grid
.ColumnDefinitions>
<
ColumnDefinition
Width
=
"
Auto
"
/>
<
ColumnDefinition
Width
=
"
*
"
/>
</
Grid
.ColumnDefinitions>
<
Grid
.RowDefinitions>
<
RowDefinition
Height
=
"
Auto
"
/>
<
RowDefinition
Height
=
"
Auto
"
/>
</
Grid
.RowDefinitions>
<
Label
Grid.Row=
"
0
"
Grid.Column=
"
0
"
Content
=
"
Size
"
></
Label
>
<
TextBox
Grid.Row=
"
0
"
Grid.Column=
"
1
"
Text
=
"
{Binding Size}
"
VerticalAlignment
=
"
Center
"
></
TextBox
>
<
StackPanel
Grid.Row=
"
1
"
Grid.Column=
"
0
"
Grid.ColumnSpan=
"
2
"
Orientation
=
"
Horizontal
"
HorizontalAlignment
=
"
Center
"
Margin
=
"
10
"
>
<
Button
Content
=
"
Buy
"
HorizontalAlignment
=
"
Stretch
"
MinWidth
=
"
200
"
Command
=
"
{Binding BuyCmd}
"
/>
<
Button
Content
=
"
Sell
"
HorizontalAlignment
=
"
Stretch
"
MinWidth
=
"
200
"
Command
=
"
{Binding SellCmd}
"
/>
</
StackPanel
>
</
Grid
>
</
GroupBox
>
<
GroupBox
Header
=
"
Instruments (life updates using socket connection example)
"
Grid.Row=
"
2
"
Visibility
=
"
{Binding IsConnected,Converter={StaticResource BooleanToVisibilityConverter}}
"
>
<
Grid
>
<
Grid
.ColumnDefinitions>
<
ColumnDefinition
Width
=
"
*
"
/>
<
ColumnDefinition
Width
=
"
*
"
/>
<
ColumnDefinition
Width
=
"
*
"
/>
<
ColumnDefinition
Width
=
"
*
"
/>
</
Grid
.ColumnDefinitions>
<
ListView
ItemsSource
=
"
{Binding Instruments}
"
>
<
ListView
.View>
<
GridView
>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Symbol}
"
Header
=
"
Symbol
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding RootSymbol}
"
Header
=
"
RootSymbol
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding State}
"
Header
=
"
State
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Typ}
"
Header
=
"
Typ
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding LastPrice}
"
Header
=
"
LastPrice
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding LowPrice}
"
Header
=
"
LowPrice
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding HighPrice}
"
Header
=
"
HighPrice
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding LastChangePcnt}
"
Header
=
"
LastChangePcnt
"
/>
</
GridView
>
</
ListView
.View>
</
ListView
>
<
ListView
Grid.Row=
"
0
"
Grid.Column=
"
1
"
ItemsSource
=
"
{Binding OrderUpdates}
"
>
<
ListView
.View>
<
GridView
>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding OrderId}
"
Header
=
"
OrderId
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Account}
"
Header
=
"
Account
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Symbol}
"
Header
=
"
Symbol
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Side}
"
Header
=
"
Side
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding SimpleOrderQty}
"
Header
=
"
SimpleOrderQty
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding OrderQty}
"
Header
=
"
OrderQty
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Price}
"
Header
=
"
Price
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding LeavesQty}
"
Header
=
"
LeavesQty
"
/>
</
GridView
>
</
ListView
.View>
</
ListView
>
<
GroupBox
Header
=
"
OrderBookL10
"
Grid.Row=
"
0
"
Grid.Column=
"
2
"
>
<
ListView
ItemsSource
=
"
{Binding OrderBook10}
"
ItemContainerStyle
=
"
{StaticResource OrderBookItemContainerStyle}
"
>
<
ListView
.View>
<
GridView
>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Direction}
"
Header
=
"
Direction
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Size}
"
Header
=
"
Size
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Price}
"
Header
=
"
Price
"
/>
</
GridView
>
</
ListView
.View>
</
ListView
>
</
GroupBox
>
<
GroupBox
Header
=
"
OrderBookL2
"
Grid.Row=
"
0
"
Grid.Column=
"
3
"
>
<
ListView
ItemsSource
=
"
{Binding Source={StaticResource SortedOrderBookL2Sourse}}
"
ItemContainerStyle
=
"
{StaticResource OrderBookItemContainerStyle}
"
>
<
ListView
.View>
<
GridView
>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Direction}
"
Header
=
"
Direction
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Size}
"
Header
=
"
Size
"
/>
<
GridViewColumn
DisplayMemberBinding
=
"
{Binding Price}
"
Header
=
"
Price
"
/>
</
GridView
>
</
ListView
.View>
</
ListView
>
</
GroupBox
>
</
Grid
>
</
GroupBox
>
</
Grid
>
</
Window
>
Back
|
FazBrowse Home
|
New Git URL