diff --git a/docs/dokka/roboquant-xchange.md b/docs/dokka/roboquant-xchange.md index 3ecf4c4ff..926dc97dd 100644 --- a/docs/dokka/roboquant-xchange.md +++ b/docs/dokka/roboquant-xchange.md @@ -4,4 +4,4 @@ The roboquant-xchange module contains the additional functionality to integrate # Package org.roboquant.xchange -Use the XChange library to access most leading crypto exchange in the world. +Wrapper classes for the XChange library that access most leading crypto exchange in the world. There are wrapeprs for brokers, historic feeds and live feeeds. diff --git a/roboquant-server/src/test/kotlin/org/roboquant/samples/main.kt b/roboquant-server/src/test/kotlin/org/roboquant/samples/main.kt index b17ad49aa..08922d2aa 100644 --- a/roboquant-server/src/test/kotlin/org/roboquant/samples/main.kt +++ b/roboquant-server/src/test/kotlin/org/roboquant/samples/main.kt @@ -26,7 +26,7 @@ import org.roboquant.strategies.EMAStrategy fun main() { - val server = WebServer("test", "secret") + val server = WebServer("test", "secret", 8081) val feed = RandomWalkFeed.lastYears(20) feed.delay = 100L val jobs = ParallelJobs() diff --git a/roboquant/src/main/kotlin/org/roboquant/brokers/sim/execution/InternalAccount.kt b/roboquant/src/main/kotlin/org/roboquant/brokers/sim/execution/InternalAccount.kt index f08a3e712..43bda1a2b 100644 --- a/roboquant/src/main/kotlin/org/roboquant/brokers/sim/execution/InternalAccount.kt +++ b/roboquant/src/main/kotlin/org/roboquant/brokers/sim/execution/InternalAccount.kt @@ -16,7 +16,6 @@ package org.roboquant.brokers.sim.execution -import org.roboquant.backtest.mutableSynchronisedListOf import org.roboquant.brokers.Account import org.roboquant.brokers.Position import org.roboquant.brokers.Trade @@ -49,7 +48,7 @@ class InternalAccount(var baseCurrency: Currency) { /** * The trades that have been executed */ - var trades = mutableSynchronisedListOf() + var trades = mutableListOf() /** * Open orders @@ -60,7 +59,7 @@ class InternalAccount(var baseCurrency: Currency) { * Closed orders. It is private and the only way it gets filled is via the [updateOrder] when the order status is * closed. */ - private var closedOrders = mutableSynchronisedListOf() + private var closedOrders = mutableListOf() /** * Total cash balance hold in this account. This can be a single currency or multiple currencies. @@ -86,8 +85,8 @@ class InternalAccount(var baseCurrency: Currency) { internal fun removeClosedOrdersAndTrades() { // Create new instances since clear() could impact previously returned // accounts since they contain sub-lists of the closedOrders and trades. - closedOrders = mutableSynchronisedListOf() - trades = mutableSynchronisedListOf() + closedOrders = mutableListOf() + trades = mutableListOf() } /** @@ -96,8 +95,8 @@ class InternalAccount(var baseCurrency: Currency) { fun clear() { // Create new instances since clear() could impact previously returned // accounts since they contain sub-lists of the closedOrders and trades. - closedOrders = mutableSynchronisedListOf() - trades = mutableSynchronisedListOf() + closedOrders = mutableListOf() + trades = mutableListOf() lastUpdate = Instant.MIN openOrders.clear() @@ -182,10 +181,9 @@ class InternalAccount(var baseCurrency: Currency) { baseCurrency, lastUpdate, cash.clone(), - trades.subList(0, trades.size), + trades.toList(), openOrders.values.toList(), - closedOrders.subList(0, closedOrders.size), - // closedOrders.toList(), + closedOrders.toList(), portfolio.values.toList(), buyingPower )