Skip to content

Commit 676dcd5

Browse files
committed
OKCoin: added exchange support
- OKCoin uses the same API as OKEx, except that OKCoin doesn't support futures and swap symbols - refactored code out into OKGroupCommon
1 parent 3c6872e commit 676dcd5

File tree

4 files changed

+765
-703
lines changed

4 files changed

+765
-703
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
MIT LICENSE
3+
4+
Copyright 2017 Digital Ruby, LLC - http://www.digitalruby.com
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9+
10+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11+
*/
12+
13+
using ExchangeSharp.OKGroup;
14+
15+
namespace ExchangeSharp
16+
{
17+
public sealed partial class ExchangeOKCoinAPI : OKGroupCommon
18+
{
19+
public override string BaseUrl { get; set; } = "https://www.okcoin.com/api/v1";
20+
public override string BaseUrlV2 { get; set; } = "https://www.okcoin.com/v2/spot";
21+
public override string BaseUrlV3 { get; set; } = "https://www.okcoin.com/api";
22+
public override string BaseUrlWebSocket { get; set; } = "wss://real.okcoin.com:10442/ws/v3";
23+
protected override bool isFuturesAndSwapEnabled { get; } = false;
24+
}
25+
26+
public partial class ExchangeName { public const string OKCoin = "OKCoin"; }
27+
}

0 commit comments

Comments
 (0)