forked from knowm/XChange
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tim Molter
committed
Jan 24, 2022
1 parent
fcd2463
commit 723a38d
Showing
318 changed files
with
5,000 additions
and
3,225 deletions.
There are no files selected for viewing
8 changes: 7 additions & 1 deletion
8
xchange-ascendex/src/main/java/org/knowm/xchange/ascendex/AscendexAdapters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 38 additions & 34 deletions
72
...-ascendex/src/main/java/org/knowm/xchange/ascendex/dto/marketdata/AscendexBarHistDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,46 @@ | ||
package org.knowm.xchange.ascendex.dto.marketdata; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
import java.io.Serializable; | ||
|
||
public class AscendexBarHistDto implements Serializable { | ||
|
||
private final String m; | ||
private final String symbol; | ||
private final AscendexBarDto bar; | ||
|
||
public AscendexBarHistDto( | ||
@JsonProperty("m") String m, | ||
@JsonProperty("s") String symbol, | ||
@JsonProperty("data") AscendexBarDto bar) { | ||
this.m = m; | ||
this.symbol = symbol; | ||
this.bar = bar; | ||
} | ||
|
||
public String getM() { | ||
return m; | ||
} | ||
|
||
public String getSymbol() { | ||
return symbol; | ||
} | ||
|
||
public AscendexBarDto getBar() { | ||
return bar; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "AscendexBarHistDto{" + | ||
"m='" + m + '\'' + | ||
", symbol='" + symbol + '\'' + | ||
", bar=" + bar + | ||
'}'; | ||
} | ||
private final String m; | ||
private final String symbol; | ||
private final AscendexBarDto bar; | ||
|
||
public AscendexBarHistDto( | ||
@JsonProperty("m") String m, | ||
@JsonProperty("s") String symbol, | ||
@JsonProperty("data") AscendexBarDto bar) { | ||
this.m = m; | ||
this.symbol = symbol; | ||
this.bar = bar; | ||
} | ||
|
||
public String getM() { | ||
return m; | ||
} | ||
|
||
public String getSymbol() { | ||
return symbol; | ||
} | ||
|
||
public AscendexBarDto getBar() { | ||
return bar; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "AscendexBarHistDto{" | ||
+ "m='" | ||
+ m | ||
+ '\'' | ||
+ ", symbol='" | ||
+ symbol | ||
+ '\'' | ||
+ ", bar=" | ||
+ bar | ||
+ '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 13 additions & 11 deletions
24
...-ascendex/src/test/java/org/knowm/xchange/ascendex/AscendexMarketDataIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
package org.knowm.xchange.ascendex; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
import java.util.Objects; | ||
import org.junit.Assert; | ||
import org.junit.Test; | ||
import org.knowm.xchange.Exchange; | ||
import org.knowm.xchange.ExchangeFactory; | ||
import org.knowm.xchange.ascendex.dto.marketdata.AscendexBarHistDto; | ||
import org.knowm.xchange.ascendex.service.AscendexMarketDataService; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
public class AscendexMarketDataIntegrationTest { | ||
|
||
@Test | ||
public void testBarHist() throws IOException { | ||
Exchange exchange = ExchangeFactory.INSTANCE.createExchange(AscendexExchange.class.getCanonicalName()); | ||
exchange.remoteInit(); | ||
@Test | ||
public void testBarHist() throws IOException { | ||
Exchange exchange = | ||
ExchangeFactory.INSTANCE.createExchange(AscendexExchange.class.getCanonicalName()); | ||
exchange.remoteInit(); | ||
|
||
List<AscendexBarHistDto> barHistDtos = ((AscendexMarketDataService)exchange.getMarketDataService()).getBarHistoryData("BTC/USDT", "15", null, null, 100); | ||
Assert.assertTrue(Objects.nonNull(barHistDtos) && !barHistDtos.isEmpty()); | ||
} | ||
List<AscendexBarHistDto> barHistDtos = | ||
((AscendexMarketDataService) exchange.getMarketDataService()) | ||
.getBarHistoryData("BTC/USDT", "15", null, null, 100); | ||
Assert.assertTrue(Objects.nonNull(barHistDtos) && !barHistDtos.isEmpty()); | ||
} | ||
} |
7 changes: 6 additions & 1 deletion
7
xchange-bankera/src/main/java/org/knowm/xchange/bankera/Bankera.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.