聊天记录
共 410 条,显示第 251-300 条
and passing that few messages between threads is basically something you don't even have to think about from a performance perspective
and passing that few messages between threads is basically something you don't even have to think about from a performance perspective
1 market has max 200 price levels (most of which you probably don't care about)...so 400 markets means 80,000 price levels where you're tracking price + quantity which is like MAYBE 64 bits (8 bytes)...soooooooo 8 x 80k = 640k bytes...less than one MB lol
1 market has max 200 price levels (most of which you probably don't care about)...so 400 markets means 80,000 price levels where you're tracking price + quantity which is like MAYBE 64 bits (8 bytes)...soooooooo 8 x 80k = 640k bytes...less than one MB lol
No, I meant isolate each event. 400 markets on a single multi-threaded machine (or even single threaded) should be easy to handle.
No, I meant isolate each event. 400 markets on a single multi-threaded machine (or even single threaded) should be easy to handle.
Still not anything unreasonable. I assume most of those markets don't see any actual trade (same as the crypto ones).
Still not anything unreasonable. I assume most of those markets don't see any actual trade (same as the crypto ones).
Not sure if that even applies here considering the whole app is just side-skirting gambling laws, but IANAL.
Not sure if that even applies here considering the whole app is just side-skirting gambling laws, but IANAL.
Legality aside, you'd be losing money to Kalshi fees self trading anyway.
Legality aside, you'd be losing money to Kalshi fees self trading anyway.
Just have the bots running on different events.
Just have the bots running on different events.
Not if you're not on both sides of the same trade.
Not if you're not on both sides of the same trade.
just have your spouse run a separate bot...no different than anyone else running a bot
just have your spouse run a separate bot...no different than anyone else running a bot
lol
lol
then like I said, get married and abuse wife privileges 😂
then like I said, get married and abuse wife privileges 😂
idk if I would be concerned about 1ms lol your highest latency is going to be web connections to their servers (rest, ws, etc.)
idk if I would be concerned about 1ms lol your highest latency is going to be web connections to their servers (rest, ws, etc.)
GC?
GC?
Is it against TOS to have multiple accounts? If it's not, you can isolate even the rate limits.
Is it against TOS to have multiple accounts? If it's not, you can isolate even the rate limits.
RMQ has ~1-10ms latency if you want something overkill...otherwise multi-threading and having a capable box should handle it
RMQ has ~1-10ms latency if you want something overkill...otherwise multi-threading and having a capable box should handle it
how high is X?
how high is X?
AFAIK the BTC events have the highest # of markets at like 188 per event. Any other events don't really need to mix and can be completely isolated outside of rate limit concerns.
AFAIK the BTC events have the highest # of markets at like 188 per event. Any other events don't really need to mix and can be completely isolated outside of rate limit concerns.
If you're oversubbed, just split it up into multiple WS/consumers.
If you're oversubbed, just split it up into multiple WS/consumers.
Then are you just oversubscribed? lol
That should eliminate all the backpressure.
Then are you just oversubscribed? lol
That should eliminate all the backpressure.
It's pretty simple to decouple ingestion from processing.
It's pretty simple to decouple ingestion from processing.
In .NET it's literally this simple:
```
//queue for presistent storage
if (!_orderbookSnapshotPersistenceChannelWriter.TryWrite(marketStates))
{
_logger.LogError($"Failed to persist orderbook snapshots.");
}
```
to
```
await foreach (IReadOnlyList<MarketState> marketStates in _channelReader.ReadAllAsync(cancellationToken))
{
...
```
In .NET it's literally this simple:
```
//queue for presistent storage
if (!_orderbookSnapshotPersistenceChannelWriter.TryWrite(marketStates))
{
_logger.LogError($"Failed to persist orderbook snapshots.");
}
```
to
```
await foreach (IReadOnlyList<MarketState> marketStates in _channelReader.ReadAllAsync(cancellationToken))
{
...
```
Why not? Smash it into a ConcurrentQueue or something like RMQ and process it elsewhere on a diff thread/machine/etc.
Why not? Smash it into a ConcurrentQueue or something like RMQ and process it elsewhere on a diff thread/machine/etc.
all you have to do is separate the processing from the ingestion...should take like 5 minutes tops even on the sloppiest of prototypes
all you have to do is separate the processing from the ingestion...should take like 5 minutes tops even on the sloppiest of prototypes
it was born wrong
it was born wrong
Do you use the sequence IDs in the order book web sockets? That should handle most issues.
Do you use the sequence IDs in the order book web sockets? That should handle most issues.
What events are you running it on?
What events are you running it on?
yeah like event ticker would be nice
yeah like event ticker would be nice
Commands are single sends. Number of markets shouldn't matter if they're wording it intentionally.
Commands are single sends. Number of markets shouldn't matter if they're wording it intentionally.
Compounding nets are brutal 😛
Compounding nets are brutal 😛
My bot has two very different potential outcomes lol
+45.7% vs -37.3%
My bot has two very different potential outcomes lol
+45.7% vs -37.3%
Anddd one 15 minute wipes it all out lol
Anddd one 15 minute wipes it all out lol
I do both in my app.
I do both in my app.
And there aren't any issues using multiple websocket connections and spreading out the subs.
And there aren't any issues using multiple websocket connections and spreading out the subs.
RMQ works great for this if you want to use multiple machines/threads to handle the processing.
RMQ works great for this if you want to use multiple machines/threads to handle the processing.
Shouldn't be a hard problem to solve. Read the WS messages as they come in, put them in a queue, then have your processing logic be on a separate thread from your WS reads.
Shouldn't be a hard problem to solve. Read the WS messages as they come in, put them in a queue, then have your processing logic be on a separate thread from your WS reads.
I just had to make sure
I just had to make sure
yeah and it's borderline useless lol
yeah and it's borderline useless lol
https://docs.kalshi.com/api-reference/exchange/get-exchange-status
https://docs.kalshi.com/api-reference/exchange/get-exchange-status
nah, just need to know when the data was created
nah, just need to know when the data was created
orderbook snapshots don't come with timestamps?
```
{
"type": "orderbook_snapshot",
"sid": 2,
"seq": 2,
"msg": {
"market_ticker": "FED-23DEC-T3.00",
"market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1",
"yes_dollars_fp": [
[
"0.0800",
"300.00"
],
[
"0.2200",
"333.00"
]
],
"no_dollars_fp": [
[
"0.5400",
"20.00"
],
[
"0.5600",
"146.00"
]
]
}
}
```
orderbook snapshots don't come with timestamps?
```
{
"type": "orderbook_snapshot",
"sid": 2,
"seq": 2,
"msg": {
"market_ticker": "FED-23DEC-T3.00",
"market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1",
"yes_dollars_fp": [
[
"0.0800",
"300.00"
],
[
"0.2200",
"333.00"
]
],
"no_dollars_fp": [
[
"0.5400",
"20.00"
],
[
"0.5600",
"146.00"
]
]
}
}
```
slow your app down to a hault and wait to see what error you get
slow your app down to a hault and wait to see what error you get
https://tenor.com/view/sanic-the-hedgehob-running-gotta-go-fast-fast-gif-4964355
https://tenor.com/view/sanic-the-hedgehob-running-gotta-go-fast-fast-gif-4964355
https://www.cyberciti.biz/faq/how-to-install-docker-on-amazon-linux-2/
https://www.cyberciti.biz/faq/how-to-install-docker-on-amazon-linux-2/
Docker's not hard to setup.
Docker's not hard to setup.
Worst case you run microservices on multiple instances.
Worst case you run microservices on multiple instances.
IIRC docker limits memory and you can run multiple things isolated on a single box.
IIRC docker limits memory and you can run multiple things isolated on a single box.
containerize your app with something like docker?
containerize your app with something like docker?
might be able to check terminal logs and see if there's anything
might be able to check terminal logs and see if there's anything
What are you using on AWS? An EC2 instance?
What are you using on AWS? An EC2 instance?
I've only messed with Azure and yeah...not much better than AWS.
I've only messed with Azure and yeah...not much better than AWS.