Disable candle logging, set prefered tps with 19 (max 20 for REST api spec)

This commit is contained in:
2023-05-31 20:13:15 +09:00
parent ee76299ac9
commit 62e67fe441
2 changed files with 9 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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")