tornapi-typescript 5.3.0 → 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Torn API",
5
5
  "description": "\n * The development of Torn's API v2 is still ongoing.\n * If selections remain unaltered, they will default to the API v1 version.\n * Unlike API v1, API v2 accepts both selections and IDs as path and query parameters.\n * If any discrepancies or errors are found, please submit a [bug report](https://www.torn.com/forums.php#/p=forums&f=19&b=0&a=0) on the Torn Forums.\n * In case you're using bots to check for changes on openapi.json file, make sure to specificy a custom user-agent header - CloudFlare sometimes prevents requests from default user-agents.",
6
- "version": "5.3.0"
6
+ "version": "5.5.0"
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -3071,6 +3071,150 @@
3071
3071
  "x-stability": "Stable"
3072
3072
  }
3073
3073
  },
3074
+ "/user/stocks": {
3075
+ "get": {
3076
+ "tags": [
3077
+ "User"
3078
+ ],
3079
+ "summary": "Get your stocks",
3080
+ "description": "Requires limited access key. <br>",
3081
+ "operationId": "getMyStocks",
3082
+ "parameters": [
3083
+ {
3084
+ "$ref": "#/components/parameters/ApiTimestamp"
3085
+ },
3086
+ {
3087
+ "$ref": "#/components/parameters/ApiComment"
3088
+ },
3089
+ {
3090
+ "$ref": "#/components/parameters/ApiKeyLimited"
3091
+ }
3092
+ ],
3093
+ "responses": {
3094
+ "200": {
3095
+ "description": "Successful operation",
3096
+ "content": {
3097
+ "application/json": {
3098
+ "schema": {
3099
+ "$ref": "#/components/schemas/UserStocksResponse"
3100
+ }
3101
+ }
3102
+ }
3103
+ }
3104
+ },
3105
+ "security": [
3106
+ {
3107
+ "api_key": []
3108
+ }
3109
+ ],
3110
+ "x-stability": "Unstable"
3111
+ }
3112
+ },
3113
+ "/user/trades": {
3114
+ "get": {
3115
+ "tags": [
3116
+ "User"
3117
+ ],
3118
+ "summary": "Get your trades",
3119
+ "description": "Requires limited access key. <br>",
3120
+ "operationId": "getMyTrades",
3121
+ "parameters": [
3122
+ {
3123
+ "$ref": "#/components/parameters/ApiStripTagsTrue"
3124
+ },
3125
+ {
3126
+ "$ref": "#/components/parameters/ApiLimit100"
3127
+ },
3128
+ {
3129
+ "$ref": "#/components/parameters/ApiSortDesc"
3130
+ },
3131
+ {
3132
+ "$ref": "#/components/parameters/ApiTo"
3133
+ },
3134
+ {
3135
+ "$ref": "#/components/parameters/ApiFrom"
3136
+ },
3137
+ {
3138
+ "$ref": "#/components/parameters/ApiTimestamp"
3139
+ },
3140
+ {
3141
+ "$ref": "#/components/parameters/ApiComment"
3142
+ },
3143
+ {
3144
+ "$ref": "#/components/parameters/ApiKeyLimited"
3145
+ }
3146
+ ],
3147
+ "responses": {
3148
+ "200": {
3149
+ "description": "Successful operation",
3150
+ "content": {
3151
+ "application/json": {
3152
+ "schema": {
3153
+ "$ref": "#/components/schemas/UserTradesResponse"
3154
+ }
3155
+ }
3156
+ }
3157
+ }
3158
+ },
3159
+ "security": [
3160
+ {
3161
+ "api_key": []
3162
+ }
3163
+ ],
3164
+ "x-stability": "Unstable"
3165
+ }
3166
+ },
3167
+ "/user/{tradeId}/trade": {
3168
+ "get": {
3169
+ "tags": [
3170
+ "User"
3171
+ ],
3172
+ "summary": "Get your detailed trade",
3173
+ "description": "Requires limited access key. <br>Only possible to get trades you participated in.",
3174
+ "operationId": "getMyDetailedTrade",
3175
+ "parameters": [
3176
+ {
3177
+ "name": "id",
3178
+ "in": "path",
3179
+ "description": "Trade id",
3180
+ "required": true,
3181
+ "schema": {
3182
+ "$ref": "#/components/schemas/TradeId"
3183
+ }
3184
+ },
3185
+ {
3186
+ "$ref": "#/components/parameters/ApiStripTagsTrue"
3187
+ },
3188
+ {
3189
+ "$ref": "#/components/parameters/ApiTimestamp"
3190
+ },
3191
+ {
3192
+ "$ref": "#/components/parameters/ApiComment"
3193
+ },
3194
+ {
3195
+ "$ref": "#/components/parameters/ApiKeyLimited"
3196
+ }
3197
+ ],
3198
+ "responses": {
3199
+ "200": {
3200
+ "description": "Successful operation",
3201
+ "content": {
3202
+ "application/json": {
3203
+ "schema": {
3204
+ "$ref": "#/components/schemas/UserTradeResponse"
3205
+ }
3206
+ }
3207
+ }
3208
+ }
3209
+ },
3210
+ "security": [
3211
+ {
3212
+ "api_key": []
3213
+ }
3214
+ ],
3215
+ "x-stability": "Unstable"
3216
+ }
3217
+ },
3074
3218
  "/user/travel": {
3075
3219
  "get": {
3076
3220
  "tags": [
@@ -3341,6 +3485,9 @@
3341
3485
  {
3342
3486
  "$ref": "#/components/schemas/TornCrimeId"
3343
3487
  },
3488
+ {
3489
+ "$ref": "#/components/schemas/TradeId"
3490
+ },
3344
3491
  {
3345
3492
  "type": "string"
3346
3493
  }
@@ -3486,6 +3633,9 @@
3486
3633
  {
3487
3634
  "$ref": "#/components/schemas/UserEducationResponse"
3488
3635
  },
3636
+ {
3637
+ "$ref": "#/components/schemas/UserStocksResponse"
3638
+ },
3489
3639
  {
3490
3640
  "$ref": "#/components/schemas/UserBountiesResponse"
3491
3641
  },
@@ -3588,6 +3738,12 @@
3588
3738
  {
3589
3739
  "$ref": "#/components/schemas/UserBattleStatsResponse"
3590
3740
  },
3741
+ {
3742
+ "$ref": "#/components/schemas/UserTradeResponse"
3743
+ },
3744
+ {
3745
+ "$ref": "#/components/schemas/UserTradesResponse"
3746
+ },
3591
3747
  {
3592
3748
  "$ref": "#/components/schemas/UserNewEventsResponse"
3593
3749
  },
@@ -9201,6 +9357,93 @@
9201
9357
  "x-stability": "Stable"
9202
9358
  }
9203
9359
  },
9360
+ "/torn/stocks": {
9361
+ "get": {
9362
+ "tags": [
9363
+ "Torn"
9364
+ ],
9365
+ "summary": "Get all stocks",
9366
+ "description": "Requires public access key. <br>",
9367
+ "operationId": "getTornStocks",
9368
+ "parameters": [
9369
+ {
9370
+ "$ref": "#/components/parameters/ApiTimestamp"
9371
+ },
9372
+ {
9373
+ "$ref": "#/components/parameters/ApiComment"
9374
+ },
9375
+ {
9376
+ "$ref": "#/components/parameters/ApiKeyPublic"
9377
+ }
9378
+ ],
9379
+ "responses": {
9380
+ "200": {
9381
+ "description": "Successful operation",
9382
+ "content": {
9383
+ "application/json": {
9384
+ "schema": {
9385
+ "$ref": "#/components/schemas/TornStocksResponse"
9386
+ }
9387
+ }
9388
+ }
9389
+ }
9390
+ },
9391
+ "security": [
9392
+ {
9393
+ "api_key": []
9394
+ }
9395
+ ],
9396
+ "x-stability": "Unstable"
9397
+ }
9398
+ },
9399
+ "/torn/{stockId}/stocks": {
9400
+ "get": {
9401
+ "tags": [
9402
+ "Torn"
9403
+ ],
9404
+ "summary": "Get specific stock with chart history",
9405
+ "description": "Requires public access key. <br>",
9406
+ "operationId": "getSpecificTornStock",
9407
+ "parameters": [
9408
+ {
9409
+ "name": "stockId",
9410
+ "in": "path",
9411
+ "description": "Stock id",
9412
+ "required": true,
9413
+ "schema": {
9414
+ "$ref": "#/components/schemas/StockId"
9415
+ }
9416
+ },
9417
+ {
9418
+ "$ref": "#/components/parameters/ApiTimestamp"
9419
+ },
9420
+ {
9421
+ "$ref": "#/components/parameters/ApiComment"
9422
+ },
9423
+ {
9424
+ "$ref": "#/components/parameters/ApiKeyPublic"
9425
+ }
9426
+ ],
9427
+ "responses": {
9428
+ "200": {
9429
+ "description": "Successful operation",
9430
+ "content": {
9431
+ "application/json": {
9432
+ "schema": {
9433
+ "$ref": "#/components/schemas/TornStockDetailedResponse"
9434
+ }
9435
+ }
9436
+ }
9437
+ }
9438
+ },
9439
+ "security": [
9440
+ {
9441
+ "api_key": []
9442
+ }
9443
+ ],
9444
+ "x-stability": "Unstable"
9445
+ }
9446
+ },
9204
9447
  "/torn/{crimeId}/subcrimes": {
9205
9448
  "get": {
9206
9449
  "tags": [
@@ -9422,6 +9665,9 @@
9422
9665
  {
9423
9666
  "$ref": "#/components/schemas/TornCrimeId"
9424
9667
  },
9668
+ {
9669
+ "$ref": "#/components/schemas/StockId"
9670
+ },
9425
9671
  {
9426
9672
  "$ref": "#/components/schemas/EliminationTeamId"
9427
9673
  },
@@ -9586,6 +9832,12 @@
9586
9832
  {
9587
9833
  "$ref": "#/components/schemas/AttackLogResponse"
9588
9834
  },
9835
+ {
9836
+ "$ref": "#/components/schemas/TornStockDetailedResponse"
9837
+ },
9838
+ {
9839
+ "$ref": "#/components/schemas/TornStocksResponse"
9840
+ },
9589
9841
  {
9590
9842
  "$ref": "#/components/schemas/TornTerritoriesResponse"
9591
9843
  },
@@ -14059,10 +14311,7 @@
14059
14311
  "attacksdamaging",
14060
14312
  "attacksrunaway",
14061
14313
  "highestterritories",
14062
- "territoryrespect",
14063
- "membersamount",
14064
- "factionage",
14065
- "upgradesamount"
14314
+ "territoryrespect"
14066
14315
  ]
14067
14316
  },
14068
14317
  "FactionBranchStateEnum": {
@@ -14236,12 +14485,16 @@
14236
14485
  },
14237
14486
  "TornOrganizedCrimePositionIdDeprecated": {
14238
14487
  "description": "This field is now available in 'position_info' object as 'id' field.<br>This field will be removed on 1st of June 2026.",
14239
- "deprecated": true,
14240
- "allOf": [
14241
- {
14242
- "$ref": "#/components/schemas/TornOrganizedCrimePositionId"
14243
- }
14244
- ]
14488
+ "type": "string",
14489
+ "enum": [
14490
+ "P1",
14491
+ "P2",
14492
+ "P3",
14493
+ "P4",
14494
+ "P5",
14495
+ "P6"
14496
+ ],
14497
+ "deprecated": true
14245
14498
  },
14246
14499
  "FactionTerritoryWarResultEnum": {
14247
14500
  "type": "string",
@@ -14645,6 +14898,14 @@
14645
14898
  "type": "integer",
14646
14899
  "format": "int32"
14647
14900
  },
14901
+ "TradeId": {
14902
+ "type": "integer",
14903
+ "format": "int64"
14904
+ },
14905
+ "StockId": {
14906
+ "type": "integer",
14907
+ "format": "int32"
14908
+ },
14648
14909
  "DiscordId": {
14649
14910
  "type": "string"
14650
14911
  },
@@ -15110,7 +15371,7 @@
15110
15371
  "Head"
15111
15372
  ]
15112
15373
  },
15113
- "AttackPlayerFaction": {
15374
+ "UserFactionBasic": {
15114
15375
  "required": [
15115
15376
  "id",
15116
15377
  "name"
@@ -15146,7 +15407,7 @@
15146
15407
  "faction": {
15147
15408
  "oneOf": [
15148
15409
  {
15149
- "$ref": "#/components/schemas/AttackPlayerFaction"
15410
+ "$ref": "#/components/schemas/UserFactionBasic"
15150
15411
  },
15151
15412
  {
15152
15413
  "type": "null"
@@ -16836,46 +17097,483 @@
16836
17097
  "$ref": "#/components/schemas/ErrorBackendError"
16837
17098
  },
16838
17099
  {
16839
- "$ref": "#/components/schemas/ErrorApiKeyPaused"
17100
+ "$ref": "#/components/schemas/ErrorApiKeyPaused"
17101
+ },
17102
+ {
17103
+ "$ref": "#/components/schemas/ErrorMustMigrateToCrimesV2"
17104
+ },
17105
+ {
17106
+ "$ref": "#/components/schemas/ErrorRaceNotFinished"
17107
+ },
17108
+ {
17109
+ "$ref": "#/components/schemas/ErrorIncorrectCategory"
17110
+ },
17111
+ {
17112
+ "$ref": "#/components/schemas/ErrorOnlyAvailableInApiV1"
17113
+ },
17114
+ {
17115
+ "$ref": "#/components/schemas/ErrorOnlyAvailableInApiV2"
17116
+ },
17117
+ {
17118
+ "$ref": "#/components/schemas/ErrorClosedTemporarily"
17119
+ },
17120
+ {
17121
+ "$ref": "#/components/schemas/ErrorInvalidStatRequested"
17122
+ },
17123
+ {
17124
+ "$ref": "#/components/schemas/ErrorOnlyCategoryOrStatsAllowed"
17125
+ },
17126
+ {
17127
+ "$ref": "#/components/schemas/ErrorMustMigrateToOrganizedCrimesV2"
17128
+ },
17129
+ {
17130
+ "$ref": "#/components/schemas/ErrorIncorrectLogId"
17131
+ },
17132
+ {
17133
+ "$ref": "#/components/schemas/ErrorCategorySelectionUnavailableForInteractionLogs"
17134
+ }
17135
+ ]
17136
+ },
17137
+ "UserTradesResponse": {
17138
+ "required": [
17139
+ "trades",
17140
+ "_metadata"
17141
+ ],
17142
+ "properties": {
17143
+ "trades": {
17144
+ "type": "array",
17145
+ "items": {
17146
+ "$ref": "#/components/schemas/UserTrade"
17147
+ }
17148
+ },
17149
+ "_metadata": {
17150
+ "$ref": "#/components/schemas/RequestMetadataWithLinks"
17151
+ }
17152
+ },
17153
+ "type": "object"
17154
+ },
17155
+ "UserTradeResponse": {
17156
+ "required": [
17157
+ "trade"
17158
+ ],
17159
+ "properties": {
17160
+ "trade": {
17161
+ "$ref": "#/components/schemas/UserTradeDetailed"
17162
+ }
17163
+ },
17164
+ "type": "object"
17165
+ },
17166
+ "UserTrade": {
17167
+ "required": [
17168
+ "id",
17169
+ "timestamp",
17170
+ "user",
17171
+ "trader",
17172
+ "items"
17173
+ ],
17174
+ "properties": {
17175
+ "id": {
17176
+ "$ref": "#/components/schemas/TradeId"
17177
+ },
17178
+ "timestamp": {
17179
+ "type": "integer",
17180
+ "format": "int32"
17181
+ },
17182
+ "user": {
17183
+ "$ref": "#/components/schemas/UserTradeParticipant"
17184
+ },
17185
+ "trader": {
17186
+ "$ref": "#/components/schemas/UserTradeParticipant"
17187
+ }
17188
+ },
17189
+ "type": "object"
17190
+ },
17191
+ "UserTradeParticipant": {
17192
+ "required": [
17193
+ "id",
17194
+ "name",
17195
+ "summary"
17196
+ ],
17197
+ "properties": {
17198
+ "id": {
17199
+ "$ref": "#/components/schemas/UserId"
17200
+ },
17201
+ "name": {
17202
+ "type": "string"
17203
+ },
17204
+ "summary": {
17205
+ "type": "array",
17206
+ "items": {
17207
+ "type": "string"
17208
+ }
17209
+ }
17210
+ },
17211
+ "type": "object"
17212
+ },
17213
+ "UserTradeDetailed": {
17214
+ "allOf": [
17215
+ {
17216
+ "$ref": "#/components/schemas/UserTrade"
17217
+ },
17218
+ {
17219
+ "required": [
17220
+ "items"
17221
+ ],
17222
+ "properties": {
17223
+ "items": {
17224
+ "type": "array",
17225
+ "items": {
17226
+ "$ref": "#/components/schemas/TradeItem"
17227
+ }
17228
+ }
17229
+ },
17230
+ "type": "object"
17231
+ }
17232
+ ]
17233
+ },
17234
+ "TradeItemNap": {
17235
+ "required": [
17236
+ "user_id",
17237
+ "type",
17238
+ "details"
17239
+ ],
17240
+ "properties": {
17241
+ "user_id": {
17242
+ "$ref": "#/components/schemas/UserId"
17243
+ },
17244
+ "type": {
17245
+ "type": "string",
17246
+ "enum": [
17247
+ "NAP"
17248
+ ]
17249
+ },
17250
+ "details": {
17251
+ "required": [
17252
+ "days",
17253
+ "factions"
17254
+ ],
17255
+ "properties": {
17256
+ "days": {
17257
+ "type": "integer",
17258
+ "format": "int32"
17259
+ },
17260
+ "factions": {
17261
+ "type": "array",
17262
+ "items": {
17263
+ "$ref": "#/components/schemas/UserFactionBasic"
17264
+ }
17265
+ }
17266
+ },
17267
+ "type": "object"
17268
+ }
17269
+ },
17270
+ "type": "object"
17271
+ },
17272
+ "TradeItemMoney": {
17273
+ "required": [
17274
+ "user_id",
17275
+ "type",
17276
+ "details"
17277
+ ],
17278
+ "properties": {
17279
+ "user_id": {
17280
+ "$ref": "#/components/schemas/UserId"
17281
+ },
17282
+ "type": {
17283
+ "type": "string",
17284
+ "enum": [
17285
+ "Money"
17286
+ ]
17287
+ },
17288
+ "details": {
17289
+ "required": [
17290
+ "amount"
17291
+ ],
17292
+ "properties": {
17293
+ "amount": {
17294
+ "type": "integer",
17295
+ "format": "int64"
17296
+ }
17297
+ },
17298
+ "type": "object"
17299
+ }
17300
+ },
17301
+ "type": "object"
17302
+ },
17303
+ "TradeItemFaction": {
17304
+ "required": [
17305
+ "user_id",
17306
+ "type",
17307
+ "details"
17308
+ ],
17309
+ "properties": {
17310
+ "user_id": {
17311
+ "$ref": "#/components/schemas/UserId"
17312
+ },
17313
+ "type": {
17314
+ "type": "string",
17315
+ "enum": [
17316
+ "Faction"
17317
+ ]
17318
+ },
17319
+ "details": {
17320
+ "required": [
17321
+ "id",
17322
+ "name",
17323
+ "respect"
17324
+ ],
17325
+ "properties": {
17326
+ "id": {
17327
+ "$ref": "#/components/schemas/FactionId"
17328
+ },
17329
+ "name": {
17330
+ "type": "string"
17331
+ },
17332
+ "respect": {
17333
+ "type": "integer",
17334
+ "format": "int32"
17335
+ }
17336
+ },
17337
+ "type": "object"
17338
+ }
17339
+ },
17340
+ "type": "object"
17341
+ },
17342
+ "TradeItemProperty": {
17343
+ "required": [
17344
+ "user_id",
17345
+ "type",
17346
+ "details"
17347
+ ],
17348
+ "properties": {
17349
+ "user_id": {
17350
+ "$ref": "#/components/schemas/UserId"
17351
+ },
17352
+ "type": {
17353
+ "type": "string",
17354
+ "enum": [
17355
+ "Property"
17356
+ ]
17357
+ },
17358
+ "details": {
17359
+ "required": [
17360
+ "id",
17361
+ "happiness"
17362
+ ],
17363
+ "properties": {
17364
+ "id": {
17365
+ "$ref": "#/components/schemas/PropertyId"
17366
+ },
17367
+ "happiness": {
17368
+ "type": "integer",
17369
+ "format": "int32"
17370
+ }
17371
+ },
17372
+ "type": "object"
17373
+ }
17374
+ },
17375
+ "type": "object"
17376
+ },
17377
+ "TradeItemCompany": {
17378
+ "required": [
17379
+ "user_id",
17380
+ "type",
17381
+ "details"
17382
+ ],
17383
+ "properties": {
17384
+ "user_id": {
17385
+ "$ref": "#/components/schemas/UserId"
17386
+ },
17387
+ "type": {
17388
+ "type": "string",
17389
+ "enum": [
17390
+ "Company"
17391
+ ]
17392
+ },
17393
+ "details": {
17394
+ "required": [
17395
+ "id",
17396
+ "name",
17397
+ "value"
17398
+ ],
17399
+ "properties": {
17400
+ "id": {
17401
+ "$ref": "#/components/schemas/CompanyId"
17402
+ },
17403
+ "name": {
17404
+ "type": "string"
17405
+ },
17406
+ "value": {
17407
+ "type": "string"
17408
+ }
17409
+ },
17410
+ "type": "object"
17411
+ }
17412
+ },
17413
+ "type": "object"
17414
+ },
17415
+ "TradeItemItem": {
17416
+ "required": [
17417
+ "user_id",
17418
+ "type",
17419
+ "details"
17420
+ ],
17421
+ "properties": {
17422
+ "user_id": {
17423
+ "$ref": "#/components/schemas/UserId"
17424
+ },
17425
+ "type": {
17426
+ "type": "string",
17427
+ "enum": [
17428
+ "Item"
17429
+ ]
17430
+ },
17431
+ "details": {
17432
+ "required": [
17433
+ "id",
17434
+ "uid",
17435
+ "amount"
17436
+ ],
17437
+ "properties": {
17438
+ "id": {
17439
+ "$ref": "#/components/schemas/ItemId"
17440
+ },
17441
+ "uid": {
17442
+ "oneOf": [
17443
+ {
17444
+ "$ref": "#/components/schemas/ItemUid"
17445
+ },
17446
+ {
17447
+ "type": "null"
17448
+ }
17449
+ ]
17450
+ },
17451
+ "amount": {
17452
+ "type": "integer",
17453
+ "format": "int64"
17454
+ }
17455
+ },
17456
+ "type": "object"
17457
+ }
17458
+ },
17459
+ "type": "object"
17460
+ },
17461
+ "TradeItem": {
17462
+ "oneOf": [
17463
+ {
17464
+ "$ref": "#/components/schemas/TradeItemMoney"
16840
17465
  },
16841
17466
  {
16842
- "$ref": "#/components/schemas/ErrorMustMigrateToCrimesV2"
17467
+ "$ref": "#/components/schemas/TradeItemItem"
16843
17468
  },
16844
17469
  {
16845
- "$ref": "#/components/schemas/ErrorRaceNotFinished"
17470
+ "$ref": "#/components/schemas/TradeItemFaction"
16846
17471
  },
16847
17472
  {
16848
- "$ref": "#/components/schemas/ErrorIncorrectCategory"
17473
+ "$ref": "#/components/schemas/TradeItemCompany"
16849
17474
  },
16850
17475
  {
16851
- "$ref": "#/components/schemas/ErrorOnlyAvailableInApiV1"
17476
+ "$ref": "#/components/schemas/TradeItemProperty"
16852
17477
  },
16853
17478
  {
16854
- "$ref": "#/components/schemas/ErrorOnlyAvailableInApiV2"
17479
+ "$ref": "#/components/schemas/TradeItemNap"
17480
+ }
17481
+ ]
17482
+ },
17483
+ "UserStockTransaction": {
17484
+ "required": [
17485
+ "id",
17486
+ "shares",
17487
+ "price",
17488
+ "timestamp"
17489
+ ],
17490
+ "properties": {
17491
+ "id": {
17492
+ "type": "integer",
17493
+ "format": "int64"
16855
17494
  },
16856
- {
16857
- "$ref": "#/components/schemas/ErrorClosedTemporarily"
17495
+ "shares": {
17496
+ "type": "integer",
17497
+ "format": "int64"
16858
17498
  },
16859
- {
16860
- "$ref": "#/components/schemas/ErrorInvalidStatRequested"
17499
+ "price": {
17500
+ "type": "integer",
17501
+ "format": "int64"
16861
17502
  },
16862
- {
16863
- "$ref": "#/components/schemas/ErrorOnlyCategoryOrStatsAllowed"
17503
+ "timestamp": {
17504
+ "type": "integer",
17505
+ "format": "int32"
17506
+ }
17507
+ },
17508
+ "type": "object"
17509
+ },
17510
+ "UserStock": {
17511
+ "required": [
17512
+ "id",
17513
+ "shares",
17514
+ "bonus",
17515
+ "transactions"
17516
+ ],
17517
+ "properties": {
17518
+ "id": {
17519
+ "$ref": "#/components/schemas/StockId"
16864
17520
  },
16865
- {
16866
- "$ref": "#/components/schemas/ErrorMustMigrateToOrganizedCrimesV2"
17521
+ "shares": {
17522
+ "type": "integer",
17523
+ "format": "int64"
16867
17524
  },
16868
- {
16869
- "$ref": "#/components/schemas/ErrorIncorrectLogId"
17525
+ "transactions": {
17526
+ "type": "array",
17527
+ "items": {
17528
+ "$ref": "#/components/schemas/UserStockTransaction"
17529
+ }
16870
17530
  },
16871
- {
16872
- "$ref": "#/components/schemas/ErrorCategorySelectionUnavailableForInteractionLogs"
17531
+ "bonus": {
17532
+ "required": [
17533
+ "available",
17534
+ "increment",
17535
+ "progress",
17536
+ "frequency"
17537
+ ],
17538
+ "properties": {
17539
+ "available": {
17540
+ "type": "boolean"
17541
+ },
17542
+ "increment": {
17543
+ "type": "integer",
17544
+ "format": "int32"
17545
+ },
17546
+ "progress": {
17547
+ "type": "integer",
17548
+ "format": "int32"
17549
+ },
17550
+ "frequency": {
17551
+ "type": "integer",
17552
+ "format": "int32"
17553
+ }
17554
+ },
17555
+ "type": "object"
16873
17556
  }
16874
- ]
17557
+ },
17558
+ "type": "object"
17559
+ },
17560
+ "UserStocksResponse": {
17561
+ "required": [
17562
+ "stocks"
17563
+ ],
17564
+ "properties": {
17565
+ "stocks": {
17566
+ "type": "array",
17567
+ "items": {
17568
+ "$ref": "#/components/schemas/UserStock"
17569
+ }
17570
+ }
17571
+ },
17572
+ "type": "object"
16875
17573
  },
16876
17574
  "UserOrganizedCrimesResponse": {
16877
17575
  "required": [
16878
- "crimes",
17576
+ "organizedcrimes",
16879
17577
  "_metadata"
16880
17578
  ],
16881
17579
  "properties": {
@@ -20545,7 +21243,7 @@
20545
21243
  "UserSelectionName": {
20546
21244
  "oneOf": [
20547
21245
  {
20548
- "description": "The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','display','gym','inventory','networth','perks','stocks'.",
21246
+ "description": "The following selections will fallback to API v1 and may change at any time: 'bazaar','criminalrecord','display','gym','inventory','networth','perks'.",
20549
21247
  "type": "string",
20550
21248
  "enum": [
20551
21249
  "ammo",
@@ -20600,8 +21298,11 @@
20600
21298
  "revives",
20601
21299
  "revivesfull",
20602
21300
  "skills",
20603
- "timestamp",
21301
+ "stocks",
21302
+ "trades",
21303
+ "trade",
20604
21304
  "travel",
21305
+ "timestamp",
20605
21306
  "weaponexp",
20606
21307
  "workstats",
20607
21308
  "bazaar",
@@ -20611,8 +21312,7 @@
20611
21312
  "gym",
20612
21313
  "inventory",
20613
21314
  "networth",
20614
- "perks",
20615
- "stocks"
21315
+ "perks"
20616
21316
  ]
20617
21317
  },
20618
21318
  {
@@ -29182,6 +29882,240 @@
29182
29882
  },
29183
29883
  "type": "object"
29184
29884
  },
29885
+ "TornStock": {
29886
+ "required": [
29887
+ "id",
29888
+ "name",
29889
+ "images",
29890
+ "acronym",
29891
+ "market",
29892
+ "bonus"
29893
+ ],
29894
+ "properties": {
29895
+ "id": {
29896
+ "$ref": "#/components/schemas/StockId"
29897
+ },
29898
+ "name": {
29899
+ "type": "string"
29900
+ },
29901
+ "acronym": {
29902
+ "type": "string"
29903
+ },
29904
+ "images": {
29905
+ "required": [
29906
+ "logo",
29907
+ "full"
29908
+ ],
29909
+ "properties": {
29910
+ "logo": {
29911
+ "type": "string"
29912
+ },
29913
+ "full": {
29914
+ "type": "string"
29915
+ }
29916
+ },
29917
+ "type": "object"
29918
+ },
29919
+ "market": {
29920
+ "required": [
29921
+ "price",
29922
+ "cap",
29923
+ "shares",
29924
+ "investors"
29925
+ ],
29926
+ "properties": {
29927
+ "price": {
29928
+ "type": "number",
29929
+ "format": "float"
29930
+ },
29931
+ "cap": {
29932
+ "type": "integer",
29933
+ "format": "int64"
29934
+ },
29935
+ "shares": {
29936
+ "type": "integer",
29937
+ "format": "int64"
29938
+ },
29939
+ "investors": {
29940
+ "type": "integer",
29941
+ "format": "int64"
29942
+ }
29943
+ },
29944
+ "type": "object"
29945
+ },
29946
+ "bonus": {
29947
+ "required": [
29948
+ "passive",
29949
+ "frequency",
29950
+ "requirement",
29951
+ "description"
29952
+ ],
29953
+ "properties": {
29954
+ "passive": {
29955
+ "type": "boolean"
29956
+ },
29957
+ "frequency": {
29958
+ "type": "integer",
29959
+ "format": "int32"
29960
+ },
29961
+ "requirement": {
29962
+ "type": "integer",
29963
+ "format": "int64"
29964
+ },
29965
+ "description": {
29966
+ "type": "string"
29967
+ }
29968
+ },
29969
+ "type": "object"
29970
+ }
29971
+ },
29972
+ "type": "object"
29973
+ },
29974
+ "TornStockPerformance": {
29975
+ "required": [
29976
+ "change",
29977
+ "change_percentage",
29978
+ "start",
29979
+ "end",
29980
+ "high",
29981
+ "low"
29982
+ ],
29983
+ "properties": {
29984
+ "change": {
29985
+ "type": "number",
29986
+ "format": "float"
29987
+ },
29988
+ "change_percentage": {
29989
+ "type": "number",
29990
+ "format": "float"
29991
+ },
29992
+ "start": {
29993
+ "type": "number",
29994
+ "format": "float"
29995
+ },
29996
+ "end": {
29997
+ "type": "number",
29998
+ "format": "float"
29999
+ },
30000
+ "high": {
30001
+ "type": "number",
30002
+ "format": "float"
30003
+ },
30004
+ "low": {
30005
+ "type": "number",
30006
+ "format": "float"
30007
+ }
30008
+ },
30009
+ "type": "object"
30010
+ },
30011
+ "TornStockHistory": {
30012
+ "required": [
30013
+ "price",
30014
+ "change",
30015
+ "timestamp"
30016
+ ],
30017
+ "properties": {
30018
+ "price": {
30019
+ "type": "number",
30020
+ "format": "float"
30021
+ },
30022
+ "change": {
30023
+ "type": "number",
30024
+ "format": "float"
30025
+ },
30026
+ "timestamp": {
30027
+ "type": "integer",
30028
+ "format": "int32"
30029
+ }
30030
+ },
30031
+ "type": "object"
30032
+ },
30033
+ "TornStockDetailed": {
30034
+ "allOf": [
30035
+ {
30036
+ "$ref": "#/components/schemas/TornStock"
30037
+ },
30038
+ {
30039
+ "required": [
30040
+ "chart"
30041
+ ],
30042
+ "properties": {
30043
+ "chart": {
30044
+ "required": [
30045
+ "performance",
30046
+ "history"
30047
+ ],
30048
+ "properties": {
30049
+ "performance": {
30050
+ "required": [
30051
+ "last_hour",
30052
+ "last_day",
30053
+ "last_week",
30054
+ "last_month",
30055
+ "last_year",
30056
+ "all_time"
30057
+ ],
30058
+ "properties": {
30059
+ "last_hour": {
30060
+ "$ref": "#/components/schemas/TornStockPerformance"
30061
+ },
30062
+ "last_day": {
30063
+ "$ref": "#/components/schemas/TornStockPerformance"
30064
+ },
30065
+ "last_week": {
30066
+ "$ref": "#/components/schemas/TornStockPerformance"
30067
+ },
30068
+ "last_month": {
30069
+ "$ref": "#/components/schemas/TornStockPerformance"
30070
+ },
30071
+ "last_year": {
30072
+ "$ref": "#/components/schemas/TornStockPerformance"
30073
+ },
30074
+ "all_time": {
30075
+ "$ref": "#/components/schemas/TornStockPerformance"
30076
+ }
30077
+ },
30078
+ "type": "object"
30079
+ },
30080
+ "history": {
30081
+ "type": "array",
30082
+ "items": {
30083
+ "$ref": "#/components/schemas/TornStockHistory"
30084
+ }
30085
+ }
30086
+ },
30087
+ "type": "object"
30088
+ }
30089
+ },
30090
+ "type": "object"
30091
+ }
30092
+ ]
30093
+ },
30094
+ "TornStocksResponse": {
30095
+ "required": [
30096
+ "stocks"
30097
+ ],
30098
+ "properties": {
30099
+ "stocks": {
30100
+ "type": "array",
30101
+ "items": {
30102
+ "$ref": "#/components/schemas/TornStock"
30103
+ }
30104
+ }
30105
+ },
30106
+ "type": "object"
30107
+ },
30108
+ "TornStockDetailedResponse": {
30109
+ "required": [
30110
+ "stocks"
30111
+ ],
30112
+ "properties": {
30113
+ "stocks": {
30114
+ "$ref": "#/components/schemas/TornStockDetailed"
30115
+ }
30116
+ },
30117
+ "type": "object"
30118
+ },
29185
30119
  "TornEliminationTeamLeader": {
29186
30120
  "allOf": [
29187
30121
  {
@@ -31213,7 +32147,7 @@
31213
32147
  "TornSelectionName": {
31214
32148
  "oneOf": [
31215
32149
  {
31216
- "description": "The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','itemdetails','itemstats','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats','stocks'.\n * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.",
32150
+ "description": "The following selections will fallback to API v1 and may change at any time: 'bank','cards','cityshops','companies','competition','gyms','itemdetails','itemstats','organisedcrimes','pawnshop','pokertables','rockpaperscissors','searchforcash','shoplifting','stats'.\n * The following selections are not available in API v2: 'dirtybombs','raidreport','raids', 'chainreport', 'rackets', 'rankedwarreport', 'rankedwars', 'territorynames', 'territorywarreport', 'territorywars'.",
31217
32151
  "type": "string",
31218
32152
  "enum": [
31219
32153
  "attacklog",
@@ -31237,6 +32171,7 @@
31237
32171
  "merits",
31238
32172
  "organizedcrimes",
31239
32173
  "properties",
32174
+ "stocks",
31240
32175
  "subcrimes",
31241
32176
  "territory",
31242
32177
  "timestamp",
@@ -31254,8 +32189,7 @@
31254
32189
  "rockpaperscissors",
31255
32190
  "searchforcash",
31256
32191
  "shoplifting",
31257
- "stats",
31258
- "stocks"
32192
+ "stats"
31259
32193
  ]
31260
32194
  },
31261
32195
  {