[原文網址](https://connect.spotware.com/docs/available-resources/code-samples/getting-started-in-c)
### How to get started your own app in C#:
1.從這里下載C#類生成器:[Protocol Buffers Gen](https://connect.spotware.com/uploads/misc/Protocol%20Buffers%20Gen.rar)
2. 將文件解壓縮到本地驅動器
3.從我們的github存儲庫下載最新版本的Trading API .proto源代碼:[connect-protobuf-messages](https://github.com/spotware/connect-protobuf-messages)
4.將它們放在您在步驟2中提取文件的相同位置
5.對所有.proto文件執行** ProtoGen.exe * protofile.proto * \ - output \ _directory = * C:\\ output \ _folder * \ - include \ _imports **
5. Execute**ProtoGen.exe*protofile.proto*\-output\_directory=*C:\\output\_folder*\--include\_imports**for all .proto files
6.將新生成的文件復制到項目中。 或者,您可以在解決方案中創建一個類庫項目,并在那里復制.cs文件。
7.將.cs文件鏈接到項目,將它們添加到項目中和/或設置項目與proto庫項目之間的依賴關系(如果您已創建庫)。 將類庫項目的引用(如果有的話)添加到主項目中。
????
8.將“Google.ProtocolBuffers.dll”的引用添加到類庫項目(如果沒有類庫項目,則添加主項目)
**NOTE:**
*“Google.ProtocolBuffers.dll”通常位于路徑“{ProtoPackage} \\ Release \\ net40 \\”中。
* {ProtoPackage}是本地驅動器上的proto包位置,您將其解壓縮到之前(上面的步驟2)
*您可以使用“OpenApiLib”命名空間訪問proto類。
請在github上找到工作示例項目:[connect-csharp-samples](https://github.com/spotware/connect-csharp-samples)
[Connect-API-ASPNet-Sample](https://github.com/spotware/Connect-API-ASP.Net-Sample).。
只需使用MS Visual Studio 2013打開并構建它。
Enjoy!
- 空白目錄
- API Reference 2.0
- Getting Started
- Open Authentication
- Protocol Buffers
- Protobuf Messages Reference
- Open API Messages
- Open API Model Messages
- Open API Error Codes
- Example Projects .NET
- Spotware Proxy Cloud
- Getting Started in C#
- Test Environment
- Playground
- Frequently Asked Questions
- Lesson 1. Your First App
- Lesson 2. Get Trading Data
- Lesson 3. Get Market Data
- Lesson 4. Using Trading API