Disable candle logging, set prefered tps with 19 (max 20 for REST api spec)
This commit is contained in:
@@ -84,6 +84,9 @@ extension Domestic {
|
||||
}
|
||||
public var result: KResult? = nil
|
||||
public let credential: Credential
|
||||
public var responseDataLoggable: Bool {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
private var trId: String {
|
||||
|
||||
@@ -566,6 +566,11 @@ extension KissConsole {
|
||||
}
|
||||
_ = await getCandle(productNo: productNo)
|
||||
}
|
||||
|
||||
/// Limit to request candle with `preferCandleTPS`
|
||||
private var preferCandleTPS: UInt64 {
|
||||
return 19
|
||||
}
|
||||
|
||||
private func getCandle(productNo: String) async -> Bool {
|
||||
do {
|
||||
@@ -610,8 +615,7 @@ extension KissConsole {
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Limit to request queries with 5 tps
|
||||
try await Task.sleep(nanoseconds: 200_000_000)
|
||||
try await Task.sleep(nanoseconds: 1_000_000_000 / preferCandleTPS)
|
||||
}
|
||||
else {
|
||||
print("minute price finished")
|
||||
|
||||
Reference in New Issue
Block a user