Update configuration files for production, sandbox, and local environments. Changed Kaigen BaseUrl and database connection strings to point to new server addresses. Adjusted CORS allowed origins and authentication valid audiences for improved security and functionality.
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Kaigen": {
|
"Kaigen": {
|
||||||
"BaseUrl": "https://api.kaigen.managing.live",
|
"BaseUrl": "https://srv-captain--kaigen-back:3000",
|
||||||
"DebitEndpoint": "/api/credits/debit",
|
"DebitEndpoint": "/api/credits/debit",
|
||||||
"RefundEndpoint": "/api/credits/refund"
|
"RefundEndpoint": "/api/credits/refund"
|
||||||
},
|
},
|
||||||
@@ -44,9 +44,7 @@
|
|||||||
"Cors": {
|
"Cors": {
|
||||||
"AllowedOrigins": [
|
"AllowedOrigins": [
|
||||||
"https://app.kaigen.ai",
|
"https://app.kaigen.ai",
|
||||||
"https://api.kaigen.ai",
|
"https://web-ui.kai.managing.live"
|
||||||
"https://web-ui.kai.managing.live",
|
|
||||||
"http://localhost:3000"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Authentication": {
|
"Authentication": {
|
||||||
@@ -55,8 +53,7 @@
|
|||||||
"ValidIssuer": "https://api.kaigen.ai",
|
"ValidIssuer": "https://api.kaigen.ai",
|
||||||
"ValidAudiences": [
|
"ValidAudiences": [
|
||||||
"https://app.kaigen.ai",
|
"https://app.kaigen.ai",
|
||||||
"https://web-ui.kai.managing.live",
|
"https://web-ui.kai.managing.live"
|
||||||
"http://localhost:3000"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"PostgreSql": {
|
"PostgreSql": {
|
||||||
"ConnectionString": "Host=srv-captain--managing-postgre;Port=5432;Database=managing;Username=postgres;Password=29032b13a5bc4d37",
|
"ConnectionString": "Host=srv-captain--db;Port=5432;Database=managing;Username=postgres;Password=28d7c07e72296e08",
|
||||||
"Orleans": "Host=srv-captain--managing-postgre;Port=5432;Database=orleans;Username=postgres;Password=29032b13a5bc4d37"
|
"Orleans": "Host=srv-captain--db;Port=5432;Database=orleans;Username=postgres;Password=28d7c07e72296e08"
|
||||||
},
|
},
|
||||||
"InfluxDb": {
|
"InfluxDb": {
|
||||||
"Url": "http://srv-captain--influx-db:8086/",
|
"Url": "http://srv-captain--influx-db:8086/",
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"Token": "zODh8Hn8sN5VwpVJH0HAwDpCJPE4oB5IUg8L4Q0T67KM1Rta6PoM0nATUzf1ddkyWx_VledooZXfFIddahbL9Q=="
|
"Token": "zODh8Hn8sN5VwpVJH0HAwDpCJPE4oB5IUg8L4Q0T67KM1Rta6PoM0nATUzf1ddkyWx_VledooZXfFIddahbL9Q=="
|
||||||
},
|
},
|
||||||
"Kaigen": {
|
"Kaigen": {
|
||||||
"BaseUrl": "https://kaigen-back-kaigen-stage.up.railway.app",
|
"BaseUrl": "https://srv-captain--kaigen-back:3000",
|
||||||
"DebitEndpoint": "/api/credits/debit",
|
"DebitEndpoint": "/api/credits/debit",
|
||||||
"RefundEndpoint": "/api/credits/refund"
|
"RefundEndpoint": "/api/credits/refund"
|
||||||
},
|
},
|
||||||
@@ -42,8 +42,7 @@
|
|||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"Cors": {
|
"Cors": {
|
||||||
"AllowedOrigins": [
|
"AllowedOrigins": [
|
||||||
"https://kaigen-web-kaigen-stage.up.railway.app",
|
"https://kaigen-web.apps.managing.live",
|
||||||
"https://dev-managing-api.apps.managing.live",
|
|
||||||
"https://web-ui.kai.managing.live",
|
"https://web-ui.kai.managing.live",
|
||||||
"http://localhost:3000"
|
"http://localhost:3000"
|
||||||
]
|
]
|
||||||
@@ -53,7 +52,7 @@
|
|||||||
"Bearer": {
|
"Bearer": {
|
||||||
"ValidIssuer": "https://dev-managing-api.apps.managing.live",
|
"ValidIssuer": "https://dev-managing-api.apps.managing.live",
|
||||||
"ValidAudiences": [
|
"ValidAudiences": [
|
||||||
"https://kaigen-web-kaigen-stage.up.railway.app",
|
"https://kaigen-web.apps.managing.live",
|
||||||
"https://web-ui.kai.managing.live",
|
"https://web-ui.kai.managing.live",
|
||||||
"http://localhost:3000"
|
"http://localhost:3000"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"PostgreSql": {
|
"PostgreSql": {
|
||||||
"ConnectionString": "Host=managing-postgre.apps.managing.live;Port=5432;Database=managing;Username=postgres;Password=29032b13a5bc4d37",
|
"ConnectionString": "Host=db.apps.managing.live;Port=5432;Database=managing;Username=postgres;Password=28d7c07e72296e08",
|
||||||
"Orleans": "Host=managing-postgre.apps.managing.live;Port=5432;Database=orleans;Username=postgres;Password=29032b13a5bc4d37"
|
"Orleans": "Host=db.apps.managing.live;Port=5432;Database=orleans;Username=postgres;Password=28d7c07e72296e08"
|
||||||
},
|
},
|
||||||
"InfluxDb": {
|
"InfluxDb": {
|
||||||
"Url": "https://influx-db.apps.managing.live",
|
"Url": "https://influx-db.apps.managing.live",
|
||||||
|
|||||||
@@ -615,7 +615,7 @@ public class TradingBotBase : ITradingBot
|
|||||||
{
|
{
|
||||||
// Position not in history either - could be API issue or timing problem
|
// Position not in history either - could be API issue or timing problem
|
||||||
// Don't immediately close, just log warning and retry next cycle
|
// Don't immediately close, just log warning and retry next cycle
|
||||||
await LogWarning(
|
await LogDebug(
|
||||||
$"⚠️ Position Synchronization Warning\n" +
|
$"⚠️ Position Synchronization Warning\n" +
|
||||||
$"Position `{internalPosition.Identifier}` ({internalPosition.OriginDirection} {Config.Ticker})\n" +
|
$"Position `{internalPosition.Identifier}` ({internalPosition.OriginDirection} {Config.Ticker})\n" +
|
||||||
$"Not found in broker positions OR exchange history\n" +
|
$"Not found in broker positions OR exchange history\n" +
|
||||||
@@ -625,10 +625,6 @@ public class TradingBotBase : ITradingBot
|
|||||||
$"• Timing issue with broker API\n" +
|
$"• Timing issue with broker API\n" +
|
||||||
$"• Position direction mismatch\n" +
|
$"• Position direction mismatch\n" +
|
||||||
$"Will retry verification on next cycle before taking action");
|
$"Will retry verification on next cycle before taking action");
|
||||||
|
|
||||||
// Don't change the position status yet - wait for next cycle to verify
|
|
||||||
await LogDebug(
|
|
||||||
$"Position {internalPosition.Identifier} will be rechecked on next bot cycle for broker synchronization");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1248,7 +1244,8 @@ public class TradingBotBase : ITradingBot
|
|||||||
// Store the signal
|
// Store the signal
|
||||||
Signals[copySignal.Identifier] = copySignal;
|
Signals[copySignal.Identifier] = copySignal;
|
||||||
|
|
||||||
await LogInformation($"📋 Copy trading: Created copy signal {copySignal.Identifier} for master position {masterPosition.Identifier}");
|
await LogInformation(
|
||||||
|
$"📋 Copy trading: Created copy signal {copySignal.Identifier} for master position {masterPosition.Identifier}");
|
||||||
|
|
||||||
// Attempt to open the position using the existing OpenPosition method
|
// Attempt to open the position using the existing OpenPosition method
|
||||||
// This will handle all the position creation logic properly
|
// This will handle all the position creation logic properly
|
||||||
|
|||||||
Reference in New Issue
Block a user