Browse Source

快速下单工具

master
shanji 3 years ago
parent
commit
a04a2bfe89
  1. 9
      Binance.FastPlaceOrder/App.xaml
  2. 17
      Binance.FastPlaceOrder/App.xaml.cs
  3. 10
      Binance.FastPlaceOrder/AssemblyInfo.cs
  4. 10
      Binance.FastPlaceOrder/Binance.FastPlaceOrder.csproj
  5. 86
      Binance.FastPlaceOrder/MainWindow.xaml
  6. 28
      Binance.FastPlaceOrder/MainWindow.xaml.cs
  7. 8
      Binance.TradeRobot.API.sln

9
Binance.FastPlaceOrder/App.xaml

@ -0,0 +1,9 @@
<Application x:Class="Binance.FastPlaceOrder.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Binance.FastPlaceOrder"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

17
Binance.FastPlaceOrder/App.xaml.cs

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace Binance.FastPlaceOrder
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

10
Binance.FastPlaceOrder/AssemblyInfo.cs

@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

10
Binance.FastPlaceOrder/Binance.FastPlaceOrder.csproj

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>

86
Binance.FastPlaceOrder/MainWindow.xaml

@ -0,0 +1,86 @@
<Window x:Class="Binance.FastPlaceOrder.MainWindow"
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:Binance.FastPlaceOrder"
mc:Ignorable="d"
Title="币安快速下单工具" Height="450" Width="1024">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<GroupBox Header="操作区">
<GroupBox.Resources>
<Style TargetType="TextBox">
<Setter Property="Height" Value="25"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="0,0,5,0"/>
</Style>
</GroupBox.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<TextBlock Text="APIKey"/>
<TextBox Grid.Column="1"/>
<TextBlock Text="Secret" Grid.Row="1"/>
<TextBox Grid.Column="1" Grid.Row="1"/>
<TextBlock Text="交易对" Grid.Row="2"/>
<TextBox Grid.Column="1" Grid.Row="2"/>
<TextBlock Text="订单类型" Grid.Row="3"/>
<TextBox Text="市价单" Grid.Column="1" Grid.Row="3" IsEnabled="False"/>
<TextBlock Grid.Row="4" TextAlignment="Center">
<Run Text="价格止损"/>
<LineBreak/>
<Run Text="比例(%)"/>
</TextBlock>
<TextBox Grid.Column="1" Grid.Row="4" Width="50" HorizontalAlignment="Left"/>
<TextBlock Text="开仓杠杆(x)" Grid.Row="5"/>
<StackPanel Grid.Column="1" Grid.Row="5" Orientation="Horizontal">
<TextBox Width="50" />
<Button Content="修改" Height="25" Padding="5,0" Margin="5,0,0,0"/>
</StackPanel>
<Button Grid.Row="6" Grid.ColumnSpan="2" Content="开多(Num1)" Height="35" Background="Green" Foreground="White"/>
<Button Grid.Row="7" Grid.ColumnSpan="2" Content="开空(Num2)" Height="35" Background="Red" Foreground="White"/>
<Button Grid.Row="8" Grid.ColumnSpan="2" Content="平仓(Num0)" Height="35" />
</Grid>
</GroupBox>
<DataGrid Grid.Column="1">
<DataGrid.Columns>
<DataGridTextColumn Header="订单号" Width="130"/>
<DataGridTextColumn Header="方向" Width="50"/>
<DataGridTextColumn Header="类型" Width="80"/>
<DataGridTextColumn Header="状态" Width="80"/>
<DataGridTextColumn Header="成交价" Width="80"/>
<DataGridTextColumn Header="成交量" Width="80"/>
<DataGridTextColumn Header="成交时间" Width="80"/>
<DataGridTextColumn Header="平仓利润" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Window>

28
Binance.FastPlaceOrder/MainWindow.xaml.cs

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Binance.FastPlaceOrder
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}

8
Binance.TradeRobot.API.sln

@ -18,7 +18,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDKAdapter", "SDKAdapter\SDKAdapter.csproj", "{E461043B-179D-4625-BF2F-C00EAB1C8213}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDKTestConsole", "SDKTestConsole\SDKTestConsole.csproj", "{69458842-D4E0-4BB8-8E5A-254CC9074A23}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SDKTestConsole", "SDKTestConsole\SDKTestConsole.csproj", "{69458842-D4E0-4BB8-8E5A-254CC9074A23}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Binance.FastPlaceOrder", "Binance.FastPlaceOrder\Binance.FastPlaceOrder.csproj", "{CD8D9E32-CD57-4C89-B09F-DAF973A8E7F7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -50,6 +52,10 @@ Global
{69458842-D4E0-4BB8-8E5A-254CC9074A23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69458842-D4E0-4BB8-8E5A-254CC9074A23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{69458842-D4E0-4BB8-8E5A-254CC9074A23}.Release|Any CPU.Build.0 = Release|Any CPU
{CD8D9E32-CD57-4C89-B09F-DAF973A8E7F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD8D9E32-CD57-4C89-B09F-DAF973A8E7F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD8D9E32-CD57-4C89-B09F-DAF973A8E7F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD8D9E32-CD57-4C89-B09F-DAF973A8E7F7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Loading…
Cancel
Save