├── .gitattributes
├── .gitignore
├── Coinigy.API
├── Coinigy.API.sln
└── Coinigy.API
│ ├── Coinigy.API.csproj
│ ├── CoinigyApi.cs
│ ├── MarketDataType.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── Responses
│ ├── ActivityNotification.cs
│ ├── AlertData.cs
│ ├── AlertHistory.cs
│ ├── Balance.cs
│ ├── BalanceHistory.cs
│ ├── BalanceHistoryList.cs
│ ├── BaseResponse.cs
│ ├── Data.cs
│ ├── DataAsk.cs
│ ├── DataBid.cs
│ ├── DataHistory.cs
│ ├── Exchange.cs
│ ├── ExchangeAccount.cs
│ ├── Market.cs
│ ├── NewsItem.cs
│ ├── Notification.cs
│ ├── OpenAlert.cs
│ ├── OpenOrder.cs
│ ├── OrderHistory.cs
│ ├── OrderType.cs
│ ├── OrderTypes.cs
│ ├── Orders.cs
│ ├── PriceType.cs
│ ├── Ticker.cs
│ ├── UserInfo.cs
│ ├── WatchedItem.cs
│ ├── accounts_response.cs
│ ├── activateApiKey_response.cs
│ ├── activateTradingKey_response.cs
│ ├── activity_response.cs
│ ├── addAlert_response.cs
│ ├── addApiKey_response.cs
│ ├── addOrder_response.cs
│ ├── alerts_response.cs
│ ├── balanceHistory_response.cs
│ ├── balances_response.cs
│ ├── cancelOrder_response.cs
│ ├── data_response.cs
│ ├── deleteAlert_response.cs
│ ├── deleteApiKey_response.cs
│ ├── exchanges_response.cs
│ ├── markets_response.cs
│ ├── newsFeed_response.cs
│ ├── orderTypes_response.cs
│ ├── orders_response.cs
│ ├── refreshBalance_response.cs
│ ├── ticker_response.cs
│ ├── updatePrefs_response.cs
│ ├── updateTickers_response.cs
│ ├── updateUser_response.cs
│ ├── userInfo_response.cs
│ └── userWatchList_response.cs
│ └── packages.config
├── LICENSE
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | artifacts/
46 |
47 | *_i.c
48 | *_p.c
49 | *_i.h
50 | *.ilk
51 | *.meta
52 | *.obj
53 | *.pch
54 | *.pdb
55 | *.pgc
56 | *.pgd
57 | *.rsp
58 | *.sbr
59 | *.tlb
60 | *.tli
61 | *.tlh
62 | *.tmp
63 | *.tmp_proj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opendb
80 | *.opensdf
81 | *.sdf
82 | *.cachefile
83 | *.VC.db
84 | *.VC.VC.opendb
85 |
86 | # Visual Studio profiler
87 | *.psess
88 | *.vsp
89 | *.vspx
90 | *.sap
91 |
92 | # TFS 2012 Local Workspace
93 | $tf/
94 |
95 | # Guidance Automation Toolkit
96 | *.gpState
97 |
98 | # ReSharper is a .NET coding add-in
99 | _ReSharper*/
100 | *.[Rr]e[Ss]harper
101 | *.DotSettings.user
102 |
103 | # JustCode is a .NET coding add-in
104 | .JustCode
105 |
106 | # TeamCity is a build add-in
107 | _TeamCity*
108 |
109 | # DotCover is a Code Coverage Tool
110 | *.dotCover
111 |
112 | # NCrunch
113 | _NCrunch_*
114 | .*crunch*.local.xml
115 | nCrunchTemp_*
116 |
117 | # MightyMoose
118 | *.mm.*
119 | AutoTest.Net/
120 |
121 | # Web workbench (sass)
122 | .sass-cache/
123 |
124 | # Installshield output folder
125 | [Ee]xpress/
126 |
127 | # DocProject is a documentation generator add-in
128 | DocProject/buildhelp/
129 | DocProject/Help/*.HxT
130 | DocProject/Help/*.HxC
131 | DocProject/Help/*.hhc
132 | DocProject/Help/*.hhk
133 | DocProject/Help/*.hhp
134 | DocProject/Help/Html2
135 | DocProject/Help/html
136 |
137 | # Click-Once directory
138 | publish/
139 |
140 | # Publish Web Output
141 | *.[Pp]ublish.xml
142 | *.azurePubxml
143 | # TODO: Comment the next line if you want to checkin your web deploy settings
144 | # but database connection strings (with potential passwords) will be unencrypted
145 | *.pubxml
146 | *.publishproj
147 |
148 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
149 | # checkin your Azure Web App publish settings, but sensitive information contained
150 | # in these scripts will be unencrypted
151 | PublishScripts/
152 |
153 | # NuGet Packages
154 | *.nupkg
155 | # The packages folder can be ignored because of Package Restore
156 | **/packages/*
157 | # except build/, which is used as an MSBuild target.
158 | !**/packages/build/
159 | # Uncomment if necessary however generally it will be regenerated when needed
160 | #!**/packages/repositories.config
161 | # NuGet v3's project.json files produces more ignoreable files
162 | *.nuget.props
163 | *.nuget.targets
164 |
165 | # Microsoft Azure Build Output
166 | csx/
167 | *.build.csdef
168 |
169 | # Microsoft Azure Emulator
170 | ecf/
171 | rcf/
172 |
173 | # Windows Store app package directories and files
174 | AppPackages/
175 | BundleArtifacts/
176 | Package.StoreAssociation.xml
177 | _pkginfo.txt
178 |
179 | # Visual Studio cache files
180 | # files ending in .cache can be ignored
181 | *.[Cc]ache
182 | # but keep track of directories ending in .cache
183 | !*.[Cc]ache/
184 |
185 | # Others
186 | ClientBin/
187 | ~$*
188 | *~
189 | *.dbmdl
190 | *.dbproj.schemaview
191 | *.pfx
192 | *.publishsettings
193 | node_modules/
194 | orleans.codegen.cs
195 |
196 | # Since there are multiple workflows, uncomment next line to ignore bower_components
197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
198 | #bower_components/
199 |
200 | # RIA/Silverlight projects
201 | Generated_Code/
202 |
203 | # Backup & report files from converting an old project file
204 | # to a newer Visual Studio version. Backup files are not needed,
205 | # because we have git ;-)
206 | _UpgradeReport_Files/
207 | Backup*/
208 | UpgradeLog*.XML
209 | UpgradeLog*.htm
210 |
211 | # SQL Server files
212 | *.mdf
213 | *.ldf
214 |
215 | # Business Intelligence projects
216 | *.rdl.data
217 | *.bim.layout
218 | *.bim_*.settings
219 |
220 | # Microsoft Fakes
221 | FakesAssemblies/
222 |
223 | # GhostDoc plugin setting file
224 | *.GhostDoc.xml
225 |
226 | # Node.js Tools for Visual Studio
227 | .ntvs_analysis.dat
228 |
229 | # Visual Studio 6 build log
230 | *.plg
231 |
232 | # Visual Studio 6 workspace options file
233 | *.opt
234 |
235 | # Visual Studio LightSwitch build output
236 | **/*.HTMLClient/GeneratedArtifacts
237 | **/*.DesktopClient/GeneratedArtifacts
238 | **/*.DesktopClient/ModelManifest.xml
239 | **/*.Server/GeneratedArtifacts
240 | **/*.Server/ModelManifest.xml
241 | _Pvt_Extensions
242 |
243 | # Paket dependency manager
244 | .paket/paket.exe
245 | paket-files/
246 |
247 | # FAKE - F# Make
248 | .fake/
249 |
250 | # JetBrains Rider
251 | .idea/
252 | *.sln.iml
253 |
254 | # tests
255 | CoinigyApiTester/
256 |
257 | #nuget
258 | *.nuspec
259 |
260 | #executables
261 | *.bat
262 | *.exe
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Coinigy.API", "Coinigy.API\Coinigy.API.csproj", "{3360E850-78D9-4B1A-83CB-B1F39ACAF77A}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{98781E0A-6EEE-40A6-8731-9DDBA3A1AFF0}"
9 | ProjectSection(SolutionItems) = preProject
10 | ..\README.md = ..\README.md
11 | EndProjectSection
12 | EndProject
13 | Global
14 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
15 | Debug|Any CPU = Debug|Any CPU
16 | Release|Any CPU = Release|Any CPU
17 | EndGlobalSection
18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
19 | {3360E850-78D9-4B1A-83CB-B1F39ACAF77A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20 | {3360E850-78D9-4B1A-83CB-B1F39ACAF77A}.Debug|Any CPU.Build.0 = Debug|Any CPU
21 | {3360E850-78D9-4B1A-83CB-B1F39ACAF77A}.Release|Any CPU.ActiveCfg = Release|Any CPU
22 | {3360E850-78D9-4B1A-83CB-B1F39ACAF77A}.Release|Any CPU.Build.0 = Release|Any CPU
23 | EndGlobalSection
24 | GlobalSection(SolutionProperties) = preSolution
25 | HideSolutionNode = FALSE
26 | EndGlobalSection
27 | EndGlobal
28 |
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Coinigy.API.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 10.0
6 | Debug
7 | AnyCPU
8 | {3360E850-78D9-4B1A-83CB-B1F39ACAF77A}
9 | Library
10 | Properties
11 | Coinigy.API
12 | Coinigy.API
13 | en-US
14 | 512
15 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
16 | Profile111
17 | v4.5
18 |
19 |
20 |
21 |
22 | true
23 | full
24 | false
25 | bin\Debug\
26 | DEBUG;TRACE
27 | prompt
28 | 4
29 |
30 |
31 | pdbonly
32 | true
33 | bin\Release\
34 | TRACE
35 | prompt
36 | 4
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 | ..\packages\Newtonsoft.Json.9.0.1\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll
98 | True
99 |
100 |
101 | ..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8+wpa81\System.Net.Http.Extensions.dll
102 | True
103 |
104 |
105 | ..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8+wpa81\System.Net.Http.Primitives.dll
106 | True
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
117 |
118 |
119 |
120 |
127 |
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/CoinigyApi.cs:
--------------------------------------------------------------------------------
1 | //https://lisk.io/documentation?i=lisk-docs/APIReference
2 | //Author: Allen Byron Penner
3 | //TODO: fix the way errors are handled in http methods
4 |
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Net.Http;
8 | using System.Threading.Tasks;
9 | using Coinigy.API.Responses;
10 | using Newtonsoft.Json;
11 |
12 | namespace Coinigy.API
13 | {
14 | public class CoinigyApi
15 | {
16 | public CoinigyApi(string api_key, string api_secret, string serverBaseUrl = "https://api.coinigy.com/api/v1/",
17 | string userAgent =
18 | "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36")
19 | {
20 | User_Agent = userAgent;
21 | Server_Url = serverBaseUrl;
22 | Api_Key = api_key;
23 | Api_Secret = api_secret;
24 | }
25 |
26 | public string User_Agent { get; set; }
27 | public string Server_Url { get; set; }
28 |
29 | private string Api_Key { get; }
30 |
31 | private string Api_Secret { get; }
32 |
33 | public userInfo_response UserInfo()
34 | {
35 | var url = "userInfo";
36 | var gr = HttpPostRequest(url, User_Agent, new List>());
37 | return JsonConvert.DeserializeObject(gr);
38 | }
39 |
40 | public async Task UserInfoAsync()
41 | {
42 | var url = "userInfo";
43 | var gr = await HttpPostRequestAsync(url, User_Agent, new List>());
44 | return JsonConvert.DeserializeObject(gr);
45 | }
46 |
47 | public activity_response Activity()
48 | {
49 | var url = "activity";
50 | var gr = HttpPostRequest(url, User_Agent, new List>());
51 | return JsonConvert.DeserializeObject(gr);
52 | }
53 |
54 | public async Task ActivityAsync()
55 | {
56 | var url = "activity";
57 | var gr = await HttpPostRequestAsync(url, User_Agent, new List>());
58 | return JsonConvert.DeserializeObject(gr);
59 | }
60 |
61 | public accounts_response Accounts()
62 | {
63 | var url = "accounts";
64 | var gr = HttpPostRequest(url, User_Agent, new List>());
65 | return JsonConvert.DeserializeObject(gr);
66 | }
67 |
68 | public async Task AccountsAsync()
69 | {
70 | var url = "accounts";
71 | var gr = await HttpPostRequestAsync(url, User_Agent, new List>());
72 | return JsonConvert.DeserializeObject(gr);
73 | }
74 |
75 | public balances_response Balances(bool show_nils = false, string auth_ids = "")
76 | {
77 | var url = "balances";
78 | var pd = new List>
79 | {
80 | new KeyValuePair("show_nils", Convert.ToInt32(show_nils).ToString()),
81 | new KeyValuePair("auth_ids", auth_ids)
82 | };
83 | var gr = HttpPostRequest(url, User_Agent, pd);
84 | return JsonConvert.DeserializeObject(gr);
85 | }
86 |
87 | public async Task BalancesAsync(bool show_nils = false, string auth_ids = "")
88 | {
89 | var url = "balances";
90 | var pd = new List>
91 | {
92 | new KeyValuePair("show_nils", Convert.ToInt32(show_nils).ToString()),
93 | new KeyValuePair("auth_ids", auth_ids)
94 | };
95 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
96 | return JsonConvert.DeserializeObject(gr);
97 | }
98 |
99 | public balanceHistory_response BalanceHistory(string date = "")
100 | {
101 | if (string.IsNullOrEmpty(date))
102 | date = DateTime.UtcNow.ToString("yyyy-MM-dd");
103 | var url = "balanceHistory";
104 | var pd = new List>
105 | {
106 | new KeyValuePair("date", date)
107 | };
108 | var gr = HttpPostRequest(url, User_Agent, pd);
109 | return JsonConvert.DeserializeObject(gr);
110 | }
111 |
112 | public async Task BalanceHistoryAsync(string date = "")
113 | {
114 | if (string.IsNullOrEmpty(date))
115 | date = DateTime.UtcNow.ToString("yyyy-MM-dd");
116 | var url = "balanceHistory";
117 | var pd = new List>
118 | {
119 | new KeyValuePair("date", date)
120 | };
121 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
122 | return JsonConvert.DeserializeObject(gr);
123 | }
124 |
125 | public orders_response Orders()
126 | {
127 | var url = "orders";
128 | var gr = HttpPostRequest(url, User_Agent, new List>());
129 | return JsonConvert.DeserializeObject(gr);
130 | }
131 |
132 | public async Task OrdersAsync()
133 | {
134 | var url = "orders";
135 | var gr = await HttpPostRequestAsync(url, User_Agent, new List>());
136 | return JsonConvert.DeserializeObject(gr);
137 | }
138 |
139 | public alerts_response Alerts()
140 | {
141 | var url = "alerts";
142 | var gr = HttpPostRequest(url, User_Agent, new List>());
143 | return JsonConvert.DeserializeObject(gr);
144 | }
145 |
146 | public async Task AlertsAsync()
147 | {
148 | var url = "alerts";
149 | var gr = await HttpPostRequestAsync(url, User_Agent, new List>());
150 | return JsonConvert.DeserializeObject(gr);
151 | }
152 |
153 | public userWatchList_response UserWatchList()
154 | {
155 | var url = "userWatchList";
156 | var gr = HttpPostRequest(url, User_Agent, new List>());
157 | return JsonConvert.DeserializeObject(gr);
158 | }
159 |
160 | public async Task UserWatchListAsync()
161 | {
162 | var url = "userWatchList";
163 | var gr = await HttpPostRequestAsync(url, User_Agent, new List>());
164 | return JsonConvert.DeserializeObject(gr);
165 | }
166 |
167 | public newsFeed_response NewsFeed()
168 | {
169 | var url = "newsFeed";
170 | var gr = HttpPostRequest(url, User_Agent, new List>());
171 | return JsonConvert.DeserializeObject(gr);
172 | }
173 |
174 | public async Task NewsFeedAsync()
175 | {
176 | var url = "newsFeed";
177 | var gr = await HttpPostRequestAsync(url, User_Agent, new List>());
178 | return JsonConvert.DeserializeObject(gr);
179 | }
180 |
181 | public updateUser_response UpdateUser(string first_name, string last_name, string company, string phone,
182 | string street1, string street2, string city, string state, string zip, string country)
183 | {
184 | var url = "updateUser";
185 | var pd = new List>
186 | {
187 | new KeyValuePair("first_name", first_name),
188 | new KeyValuePair("last_name", last_name),
189 | new KeyValuePair("last_name", company),
190 | new KeyValuePair("last_name", phone),
191 | new KeyValuePair("last_name", street1),
192 | new KeyValuePair("last_name", street2),
193 | new KeyValuePair("last_name", city),
194 | new KeyValuePair("last_name", state),
195 | new KeyValuePair("last_name", zip),
196 | new KeyValuePair("last_name", country)
197 | };
198 | var gr = HttpPostRequest(url, User_Agent, pd);
199 | return JsonConvert.DeserializeObject(gr);
200 | }
201 |
202 | public async Task UpdateUserAsync(string first_name, string last_name, string company,
203 | string phone, string street1, string street2, string city, string state, string zip, string country)
204 | {
205 | var url = "updateUser";
206 | var pd = new List>
207 | {
208 | new KeyValuePair("first_name", first_name),
209 | new KeyValuePair("last_name", last_name),
210 | new KeyValuePair("last_name", company),
211 | new KeyValuePair("last_name", phone),
212 | new KeyValuePair("last_name", street1),
213 | new KeyValuePair("last_name", street2),
214 | new KeyValuePair("last_name", city),
215 | new KeyValuePair("last_name", state),
216 | new KeyValuePair("last_name", zip),
217 | new KeyValuePair("last_name", country)
218 | };
219 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
220 | return JsonConvert.DeserializeObject(gr);
221 | }
222 |
223 | public updatePrefs_response UpdatePrefs(bool alert_email, bool alert_sms, bool trade_email, bool trade_sms,
224 | bool balance_email)
225 | {
226 | var url = "updatePrefs";
227 | var pd = new List>
228 | {
229 | new KeyValuePair("alert_email", Convert.ToInt32(alert_email).ToString()),
230 | new KeyValuePair("last_name", Convert.ToInt32(alert_sms).ToString()),
231 | new KeyValuePair("last_name", Convert.ToInt32(trade_email).ToString()),
232 | new KeyValuePair("last_name", Convert.ToInt32(trade_sms).ToString()),
233 | new KeyValuePair("last_name", Convert.ToInt32(balance_email).ToString())
234 | };
235 | var gr = HttpPostRequest(url, User_Agent, pd);
236 | return JsonConvert.DeserializeObject(gr);
237 | }
238 |
239 | public async Task UpdatePrefsAsync(bool alert_email, bool alert_sms, bool trade_email,
240 | bool trade_sms, bool balance_email)
241 | {
242 | var url = "updatePrefs";
243 | var pd = new List>
244 | {
245 | new KeyValuePair("alert_email", Convert.ToInt32(alert_email).ToString()),
246 | new KeyValuePair("last_name", Convert.ToInt32(alert_sms).ToString()),
247 | new KeyValuePair("last_name", Convert.ToInt32(trade_email).ToString()),
248 | new KeyValuePair("last_name", Convert.ToInt32(trade_sms).ToString()),
249 | new KeyValuePair("last_name", Convert.ToInt32(balance_email).ToString())
250 | };
251 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
252 | return JsonConvert.DeserializeObject(gr);
253 | }
254 |
255 | public updateTickers_response UpdateTickers(string exch_mkt_ids)
256 | {
257 | var url = "updateTickers";
258 | var pd = new List>
259 | {
260 | new KeyValuePair("exch_mkt_ids", exch_mkt_ids)
261 | };
262 | var gr = HttpPostRequest(url, User_Agent, pd);
263 | return JsonConvert.DeserializeObject(gr);
264 | }
265 |
266 | public async Task UpdateTickersAsync(string exch_mkt_ids)
267 | {
268 | var url = "updateTickers";
269 | var pd = new List>
270 | {
271 | new KeyValuePair("exch_mkt_ids", exch_mkt_ids)
272 | };
273 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
274 | return JsonConvert.DeserializeObject(gr);
275 | }
276 |
277 | public orderTypes_response OrderTypes()
278 | {
279 | var url = "orderTypes";
280 | var gr = HttpPostRequest(url, User_Agent, new List>());
281 | return JsonConvert.DeserializeObject(gr);
282 | }
283 |
284 | public async Task OrderTypesAsync()
285 | {
286 | var url = "orderTypes";
287 | var gr = await HttpPostRequestAsync(url, User_Agent, new List>());
288 | return JsonConvert.DeserializeObject(gr);
289 | }
290 |
291 | public refreshBalance_response RefreshBalance(string auth_id)
292 | {
293 | var url = "refreshBalance";
294 | var pd = new List>
295 | {
296 | new KeyValuePair("auth_id", auth_id)
297 | };
298 | var gr = HttpPostRequest(url, User_Agent, pd);
299 | return JsonConvert.DeserializeObject(gr);
300 | }
301 |
302 | public async Task RefreshBalanceAsync(string auth_id)
303 | {
304 | var url = "refreshBalance";
305 | var pd = new List>
306 | {
307 | new KeyValuePair("auth_id", auth_id)
308 | };
309 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
310 | return JsonConvert.DeserializeObject(gr);
311 | }
312 |
313 | public addAlert_response AddAlert(string exch_code, string market_name, string alert_price,
314 | string alert_note = "")
315 | {
316 | var url = "addAlert";
317 | var pd = new List>
318 | {
319 | new KeyValuePair("exch_code", exch_code),
320 | new KeyValuePair("market_name", market_name),
321 | new KeyValuePair("alert_price", alert_price),
322 | new KeyValuePair("alert_note", alert_note)
323 | };
324 | var gr = HttpPostRequest(url, User_Agent, pd);
325 | return JsonConvert.DeserializeObject(gr);
326 | }
327 |
328 | public async Task AddAlertAsync(string exch_code, string market_name, string alert_price,
329 | string alert_note = "")
330 | {
331 | var url = "addAlert";
332 | var pd = new List>
333 | {
334 | new KeyValuePair("exch_code", exch_code),
335 | new KeyValuePair("market_name", market_name),
336 | new KeyValuePair("alert_price", alert_price),
337 | new KeyValuePair("alert_note", alert_note)
338 | };
339 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
340 | return JsonConvert.DeserializeObject(gr);
341 | }
342 |
343 | public deleteAlert_response DeleteAlert(string alert_id)
344 | {
345 | var url = "deleteAlert";
346 | var pd = new List>
347 | {
348 | new KeyValuePair("alert_id", alert_id)
349 | };
350 | var gr = HttpPostRequest(url, User_Agent, pd);
351 | return JsonConvert.DeserializeObject(gr);
352 | }
353 |
354 | public async Task DeleteAlertAsync(string alert_id)
355 | {
356 | var url = "deleteAlert";
357 | var pd = new List>
358 | {
359 | new KeyValuePair("alert_id", alert_id)
360 | };
361 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
362 | return JsonConvert.DeserializeObject(gr);
363 | }
364 |
365 | public addApiKey_response AddApiKey(string api_key, string api_secret, string api_exch_id, string api_nickname)
366 | {
367 | var url = "addApiKey";
368 | var pd = new List>
369 | {
370 | new KeyValuePair("api_key", api_key),
371 | new KeyValuePair("api_secret", api_secret),
372 | new KeyValuePair("api_exch_id", api_exch_id),
373 | new KeyValuePair("api_nickname", api_nickname)
374 | };
375 | var gr = HttpPostRequest(url, User_Agent, pd);
376 | return JsonConvert.DeserializeObject(gr);
377 | }
378 |
379 | public async Task AddApiKeyAsync(string api_key, string api_secret, string api_exch_id,
380 | string api_nickname)
381 | {
382 | var url = "addApiKey";
383 | var pd = new List>
384 | {
385 | new KeyValuePair("api_key", api_key),
386 | new KeyValuePair("api_secret", api_secret),
387 | new KeyValuePair("api_exch_id", api_exch_id),
388 | new KeyValuePair("api_nickname", api_nickname)
389 | };
390 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
391 | return JsonConvert.DeserializeObject(gr);
392 | }
393 |
394 | public deleteApiKey_response DeleteApiKey(string auth_id)
395 | {
396 | var url = "deleteApiKey";
397 | var pd = new List>
398 | {
399 | new KeyValuePair("auth_id", auth_id)
400 | };
401 | var gr = HttpPostRequest(url, User_Agent, pd);
402 | return JsonConvert.DeserializeObject(gr);
403 | }
404 |
405 | public async Task DeleteApiKeyAsync(string auth_id)
406 | {
407 | var url = "deleteApiKey";
408 | var pd = new List>
409 | {
410 | new KeyValuePair("auth_id", auth_id)
411 | };
412 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
413 | return JsonConvert.DeserializeObject(gr);
414 | }
415 |
416 | public activateApiKey_response ActivateApiKey(string auth_id, bool auth_active = true)
417 | {
418 | var url = "activateApiKey";
419 | var pd = new List>
420 | {
421 | new KeyValuePair("auth_id", auth_id),
422 | new KeyValuePair("auth_active", Convert.ToInt32(auth_id).ToString())
423 | };
424 | var gr = HttpPostRequest(url, User_Agent, pd);
425 | return JsonConvert.DeserializeObject(gr);
426 | }
427 |
428 | public async Task ActivateApiKeyAsync(string auth_id, bool auth_active = true)
429 | {
430 | var url = "activateApiKey";
431 | var pd = new List>
432 | {
433 | new KeyValuePair("auth_id", auth_id),
434 | new KeyValuePair("auth_active", Convert.ToInt32(auth_id).ToString())
435 | };
436 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
437 | return JsonConvert.DeserializeObject(gr);
438 | }
439 |
440 | public activateTradingKey_response ActivateTradingKey(string auth_id, bool auth_trade = true)
441 | {
442 | var url = "activateTradingKey";
443 | var pd = new List>
444 | {
445 | new KeyValuePair("auth_id", auth_id),
446 | new KeyValuePair("auth_trade", Convert.ToInt32(auth_id).ToString())
447 | };
448 | var gr = HttpPostRequest(url, User_Agent, pd);
449 | return JsonConvert.DeserializeObject(gr);
450 | }
451 |
452 | public async Task ActivateTradingKeyAsync(string auth_id, bool auth_trade = true)
453 | {
454 | var url = "activateTradingKey";
455 | var pd = new List>
456 | {
457 | new KeyValuePair("auth_id", auth_id),
458 | new KeyValuePair("auth_trade", Convert.ToInt32(auth_id).ToString())
459 | };
460 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
461 | return JsonConvert.DeserializeObject(gr);
462 | }
463 |
464 | public addOrder_response AddOrder(int auth_id, int exch_id, int mkt_id, int order_type_id, int price_type_id,
465 | decimal limit_price, decimal order_quantity)
466 | {
467 | var url = "addOrder";
468 | var pd = new List>
469 | {
470 | new KeyValuePair("auth_id", auth_id.ToString()),
471 | new KeyValuePair("exch_id", exch_id.ToString()),
472 | new KeyValuePair("mkt_id", mkt_id.ToString()),
473 | new KeyValuePair("order_type_id", order_type_id.ToString()),
474 | new KeyValuePair("price_type_id", price_type_id.ToString()),
475 | new KeyValuePair("limit_price", limit_price.ToString()),
476 | new KeyValuePair("order_quantity", order_quantity.ToString())
477 | };
478 | var gr = HttpPostRequest(url, User_Agent, pd);
479 | return JsonConvert.DeserializeObject(gr);
480 | }
481 |
482 | public async Task AddOrderAsync(int auth_id, int exch_id, int mkt_id, int order_type_id,
483 | int price_type_id, decimal limit_price, decimal order_quantity)
484 | {
485 | var url = "addOrder";
486 | var pd = new List>
487 | {
488 | new KeyValuePair("auth_id", auth_id.ToString()),
489 | new KeyValuePair("exch_id", exch_id.ToString()),
490 | new KeyValuePair("mkt_id", mkt_id.ToString()),
491 | new KeyValuePair("order_type_id", order_type_id.ToString()),
492 | new KeyValuePair("price_type_id", price_type_id.ToString()),
493 | new KeyValuePair("limit_price", limit_price.ToString()),
494 | new KeyValuePair("order_quantity", order_quantity.ToString())
495 | };
496 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
497 | return JsonConvert.DeserializeObject(gr);
498 | }
499 |
500 | public cancelOrder_response CancelOrder(int internal_order_id)
501 | {
502 | var url = "cancelOrder";
503 | var pd = new List>
504 | {
505 | new KeyValuePair("internal_order_id", internal_order_id.ToString())
506 | };
507 | var gr = HttpPostRequest(url, User_Agent, pd);
508 | return JsonConvert.DeserializeObject(gr);
509 | }
510 |
511 | public async Task CancelOrderAsync(int internal_order_id)
512 | {
513 | var url = "cancelOrder";
514 | var pd = new List>
515 | {
516 | new KeyValuePair("internal_order_id", internal_order_id.ToString())
517 | };
518 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
519 | return JsonConvert.DeserializeObject(gr);
520 | }
521 |
522 | public exchanges_response Exchanges()
523 | {
524 | var url = "exchanges";
525 | var gr = HttpPostRequest(url, User_Agent, new List>());
526 | return JsonConvert.DeserializeObject(gr);
527 | }
528 |
529 | public async Task ExchangesAsync()
530 | {
531 | var url = "exchanges";
532 | var gr = await HttpPostRequestAsync(url, User_Agent, new List>());
533 | return JsonConvert.DeserializeObject(gr);
534 | }
535 |
536 | public markets_response Markets(string exchange_code)
537 | {
538 | var url = "markets";
539 | var pd = new List>
540 | {
541 | new KeyValuePair("exchange_code", exchange_code)
542 | };
543 | var gr = HttpPostRequest(url, User_Agent, pd);
544 | return JsonConvert.DeserializeObject(gr);
545 | }
546 |
547 | public async Task MarketsAsync(string exchange_code)
548 | {
549 | var url = "markets";
550 | var pd = new List>
551 | {
552 | new KeyValuePair("exchange_code", exchange_code)
553 | };
554 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
555 | return JsonConvert.DeserializeObject(gr);
556 | }
557 |
558 | public data_response Data(string exchange_code, string exchange_market, MarketDataType type)
559 | {
560 | var url = "data";
561 | var typename = Enum.GetName(typeof(MarketDataType), type);
562 | var pd = new List>
563 | {
564 | new KeyValuePair("exchange_code", exchange_code),
565 | new KeyValuePair("exchange_market", exchange_market),
566 | new KeyValuePair("type", typename)
567 | };
568 | var gr = HttpPostRequest(url, User_Agent, pd);
569 | return JsonConvert.DeserializeObject(gr);
570 | }
571 |
572 | public async Task DataAsync(string exchange_code, string exchange_market, MarketDataType type)
573 | {
574 | var url = "data";
575 | var typename = Enum.GetName(typeof(MarketDataType), type);
576 | var pd = new List>
577 | {
578 | new KeyValuePair("exchange_code", exchange_code),
579 | new KeyValuePair("exchange_market", exchange_market),
580 | new KeyValuePair("type", typename)
581 | };
582 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
583 | return JsonConvert.DeserializeObject(gr);
584 | }
585 |
586 | public ticker_response Ticker(string exchange_code, string exchange_market)
587 | {
588 | var url = "ticker";
589 | var pd = new List>
590 | {
591 | new KeyValuePair("exchange_code", exchange_code),
592 | new KeyValuePair("exchange_market", exchange_market)
593 | };
594 | var gr = HttpPostRequest(url, User_Agent, pd);
595 | return JsonConvert.DeserializeObject(gr);
596 | }
597 |
598 | public async Task TickerAsync(string exchange_code, string exchange_market)
599 | {
600 | var url = "ticker";
601 | var pd = new List>
602 | {
603 | new KeyValuePair("exchange_code", exchange_code),
604 | new KeyValuePair("exchange_market", exchange_market)
605 | };
606 | var gr = await HttpPostRequestAsync(url, User_Agent, pd);
607 | return JsonConvert.DeserializeObject(gr);
608 | }
609 |
610 | private string HttpPostRequest(string url, string ua, List> postdata)
611 | {
612 | var client = new HttpClient();
613 | client.DefaultRequestHeaders.Add("User-Agent", ua);
614 | client.DefaultRequestHeaders.Add("X-API-KEY", Api_Key);
615 | client.DefaultRequestHeaders.Add("X-API-SECRET", Api_Secret);
616 |
617 | var content = new FormUrlEncodedContent(postdata);
618 |
619 | var response = client.PostAsync(Server_Url + url, content).Result;
620 |
621 | return response.IsSuccessStatusCode
622 | ? response.Content.ReadAsStringAsync().Result
623 | : "ERROR:" + response.StatusCode + " " + response.ReasonPhrase + " | " + response.RequestMessage;
624 | }
625 |
626 | private async Task HttpPostRequestAsync(string url, string ua,
627 | List> postdata)
628 | {
629 | var client = new HttpClient();
630 | client.DefaultRequestHeaders.Add("User-Agent", ua);
631 | client.DefaultRequestHeaders.Add("X-API-KEY", Api_Key);
632 | client.DefaultRequestHeaders.Add("X-API-SECRET", Api_Secret);
633 |
634 | var content = new FormUrlEncodedContent(postdata);
635 |
636 | var response = await client.PostAsync(Server_Url + url, content);
637 |
638 | return response.IsSuccessStatusCode
639 | ? await response.Content.ReadAsStringAsync()
640 | : "ERROR:" + response.StatusCode + " " + response.ReasonPhrase + " | " + response.RequestMessage;
641 | }
642 | }
643 | }
644 |
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/MarketDataType.cs:
--------------------------------------------------------------------------------
1 | namespace Coinigy.API
2 | {
3 | public enum MarketDataType
4 | {
5 | history,
6 | asks,
7 | bids,
8 | orders,
9 | all
10 | }
11 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 |
8 | [assembly: AssemblyTitle("Coinigy.API")]
9 | [assembly: AssemblyDescription("A portable API library to interact with Coinigy.com.")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Coinigy Inc.")]
12 | [assembly: AssemblyProduct("Coinigy.API")]
13 | [assembly: AssemblyCopyright("Copyright © 2016 Coinigy Inc.")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 | [assembly: NeutralResourcesLanguage("en")]
17 |
18 | // Version information for an assembly consists of the following four values:
19 | //
20 | // Major Version
21 | // Minor Version
22 | // Build Number
23 | // Revision
24 | //
25 | // You can specify all the values or you can default the Build and Revision Numbers
26 | // by using the '*' as shown below:
27 | // [assembly: AssemblyVersion("1.0.*")]
28 |
29 | [assembly: AssemblyVersion("0.1.0.*")]
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/ActivityNotification.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class ActivityNotification
7 | {
8 | public string notification_style;
9 | public string notification_time_added;
10 | public string notification_title_vars;
11 | public string notification_type_message;
12 | public string notification_type_title;
13 | public string notification_vars;
14 | }
15 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/AlertData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Newtonsoft.Json;
3 |
4 | namespace Coinigy.API.Responses
5 | {
6 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
7 | public class AlertData
8 | {
9 | public List alert_history;
10 | public List open_alerts;
11 | }
12 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/AlertHistory.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class AlertHistory
7 | {
8 | public string alert_history_id;
9 | public string alert_note;
10 | public string alert_price;
11 | public string display_name;
12 | public string exch_name;
13 | public string mkt_name;
14 | public string @operator;
15 | public string operator_text;
16 | public string price;
17 | public string timestamp;
18 | }
19 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/Balance.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class Balance
7 | {
8 | public string balance_amount_avail;
9 | public string balance_amount_held;
10 | public string balance_amount_total;
11 | public string balance_curr_code;
12 | public string btc_balance;
13 | public string last_price;
14 | }
15 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/BalanceHistory.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class BalanceHistory
7 | {
8 | public string auth_id;
9 | public string balance_amount_avail;
10 | public string balance_amount_held;
11 | public string balance_amount_total;
12 | public string balance_curr_code;
13 | public string balance_date;
14 | public string btc_value;
15 | public string timestamp;
16 | }
17 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/BalanceHistoryList.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Newtonsoft.Json;
3 |
4 | namespace Coinigy.API.Responses
5 | {
6 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
7 | public class BalanceHistoryList
8 | {
9 | public List balance_history;
10 | }
11 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/BaseResponse.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class BaseResponse
7 | {
8 | public string err_msg;
9 | public string err_num;
10 | }
11 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/Data.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Newtonsoft.Json;
3 |
4 | namespace Coinigy.API.Responses
5 | {
6 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
7 | public class Data
8 | {
9 | public List asks;
10 | public List bids;
11 | public string exch_code;
12 | public List history;
13 | public string primary_curr_code;
14 | public string secondary_curr_code;
15 | public string type;
16 | }
17 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/DataAsk.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class DataAsk
7 | {
8 | public string price;
9 | public string quantity;
10 | public string total;
11 | }
12 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/DataBid.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class DataBid
7 | {
8 | public string price;
9 | public string quantity;
10 | public string total;
11 | }
12 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/DataHistory.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class DataHistory
7 | {
8 | public string price;
9 | public string quantity;
10 | public string time_local;
11 | public string type;
12 | }
13 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/Exchange.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class Exchange
7 | {
8 | public string exch_balance_enabled;
9 | public string exch_code;
10 | public string exch_fee;
11 | public string exch_id;
12 | public string exch_name;
13 | public string exch_trade_enabled;
14 | public string exch_url;
15 | }
16 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/ExchangeAccount.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class ExchangeAccount
7 | {
8 | public string auth_active;
9 | public string auth_id;
10 | public string auth_key;
11 | public string auth_nickname;
12 | public string auth_optional1;
13 | public string auth_secret;
14 | public string auth_trade;
15 | public string auth_updated;
16 | public string exch_id;
17 | public string exch_name;
18 | public string exch_trade_enabled;
19 | }
20 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/Market.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class Market
7 | {
8 | public string exch_code;
9 | public string exch_id;
10 | public string exch_name;
11 | public string exchmkt_id;
12 | public string mkt_id;
13 | public string mkt_name;
14 | }
15 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/NewsItem.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class NewsItem
7 | {
8 | public string date_field;
9 | public string feed_description;
10 | public string feed_enabled;
11 | public string feed_id;
12 | public string feed_image;
13 | public string feed_name;
14 | public string feed_url;
15 | public string id;
16 | public string pubDate;
17 | public string published_date;
18 | public string timestamp;
19 | public string title;
20 | public string title_field;
21 | public string url;
22 | public string url_field;
23 | }
24 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/Notification.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class Notification
7 | {
8 | public string notification_id;
9 | public string notification_pinned;
10 | public string notification_sound;
11 | public string notification_sound_id;
12 | public string notification_style;
13 | public string notification_title_vars;
14 | public string notification_type_message;
15 | public string notification_type_title;
16 | public string notification_vars;
17 | }
18 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/OpenAlert.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class OpenAlert
7 | {
8 | public string alert_added;
9 | public string alert_id;
10 | public string alert_note;
11 | public string display_name;
12 | public string exch_code;
13 | public string exch_name;
14 | public string mkt_name;
15 | public string @operator;
16 | public string operator_text;
17 | public string price;
18 | }
19 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/OpenOrder.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class OpenOrder
7 | {
8 | public string auth_id;
9 | public string auth_nickname;
10 | public string display_name;
11 | public string exch_code;
12 | public string exch_name;
13 | public string foreign_order_id;
14 | public string limit_price;
15 | public string mkt_name;
16 | public string @operator;
17 | public string order_id;
18 | public string order_price_type;
19 | public string order_status;
20 | public string order_time;
21 | public string order_type;
22 | public string price_type_id;
23 | public string quantity;
24 | public string quantity_remaining;
25 | public string stop_price;
26 | }
27 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/OrderHistory.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class OrderHistory
7 | {
8 | public string auth_id;
9 | public string auth_nickname;
10 | public string display_name;
11 | public string exch_code;
12 | public string exch_id;
13 | public string exch_name;
14 | public string executed_price;
15 | public string last_updated;
16 | public string limit_price;
17 | public string mkt_name;
18 | public string order_id;
19 | public string order_price_type;
20 | public string order_status;
21 | public string order_time;
22 | public string order_type;
23 | public string quantity;
24 | public string quantity_remaining;
25 | public string unixtime;
26 | }
27 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/OrderType.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class OrderType
7 | {
8 | public string name;
9 | public string order;
10 | public string order_type_id;
11 | }
12 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/OrderTypes.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Newtonsoft.Json;
3 |
4 | namespace Coinigy.API.Responses
5 | {
6 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
7 | public class OrderTypes
8 | {
9 | public List order_types;
10 | public List price_types;
11 | }
12 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/Orders.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Newtonsoft.Json;
3 |
4 | namespace Coinigy.API.Responses
5 | {
6 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
7 | public class Orders
8 | {
9 | public List open_orders;
10 | public List order_history;
11 | }
12 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/PriceType.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class PriceType
7 | {
8 | public string name;
9 | public string order;
10 | public string price_type_id;
11 | }
12 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/Ticker.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class Ticker
7 | {
8 | public string ask;
9 | public string bid;
10 | public string current_volume;
11 | public string exchange;
12 | public string high_trade;
13 | public string last_trade;
14 | public string low_trade;
15 | public string market;
16 | public string timestamp;
17 | }
18 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/UserInfo.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class UserInfo
7 | {
8 | public string active;
9 | public string chat_enabled;
10 | public string chat_nick;
11 | public string city;
12 | public string company;
13 | public string country;
14 | public string created_on;
15 | public string custom_ticker;
16 | public string email;
17 | public string first_name;
18 | public string last_active;
19 | public string last_login;
20 | public string last_name;
21 | public string newsletter;
22 | public string phone;
23 | public string pref_alert_email;
24 | public string pref_alert_mobile;
25 | public string pref_alert_sms;
26 | public bool pref_app_device_id;
27 | public string pref_balance_email;
28 | public string pref_referral_code;
29 | public string pref_subscription_expires;
30 | public string pref_trade_email;
31 | public string pref_trade_mobile;
32 | public string pref_trade_sms;
33 | public string referral_balance;
34 | public string state;
35 | public string street1;
36 | public string street2;
37 | public string subscription_status;
38 | public string ticker_enabled;
39 | public string ticker_indicator_time_type;
40 | public string two_factor;
41 | public string zip;
42 | }
43 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/WatchedItem.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 |
3 | namespace Coinigy.API.Responses
4 | {
5 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
6 | public class WatchedItem
7 | {
8 | public string btc_volume;
9 | public string current_volume;
10 | public string exch_code;
11 | public string exch_name;
12 | public string exchmkt_id;
13 | public string fiat_market;
14 | public string high_trade;
15 | public string last_price;
16 | public string low_trade;
17 | public string mkt_name;
18 | public string prev_price;
19 | public string primary_currency_name;
20 | public string secondary_currency_name;
21 | public string server_time;
22 | }
23 | }
--------------------------------------------------------------------------------
/Coinigy.API/Coinigy.API/Responses/accounts_response.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Newtonsoft.Json;
3 |
4 | namespace Coinigy.API.Responses
5 | {
6 | [JsonObject(MemberSerialization = MemberSerialization.Fields)]
7 | public class accounts_response : BaseResponse
8 | {
9 | public List data;
10 | public List