Download the PHP package dvdx1995/cs-float-php-bundle without Composer
On this page you can find all versions of the php package dvdx1995/cs-float-php-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dvdx1995/cs-float-php-bundle
More information about dvdx1995/cs-float-php-bundle
Files in dvdx1995/cs-float-php-bundle
Package cs-float-php-bundle
Short Description PHP Bundle for CSFloat market
License MIT
Informations about the package cs-float-php-bundle
CS Float PHP Bundle
CS Float PHP Bundle is a PHP SDK for interacting with the CSFloat Market API, making it easier to integrate CSFloat services in your PHP projects.
Requirements
- PHP >= 7.1
- Composer
- Guzzle 7.x
Installation
Install via Composer:
Services
The bundle provides three main service classes:
1. CsFloatApiService (Base Service)
Base service for making API calls. All other services extend this class.
Methods:
| Method | Description | Parameters | Returns |
|---|---|---|---|
call(AbstractRequest $request) |
Execute a custom request | AbstractRequest |
array |
getMe() |
Get current authenticated user info | - | array |
2. CsFloatListingApiService
Extended service for managing listings, inventory, and item data.
Methods:
| Method | Description | Parameters | Returns |
|---|---|---|---|
getInventory() |
Get authenticated user's inventory | - | array |
createBuyNowListing(int $assetId, int $price) |
List item for sale as Buy Now | int, int |
array |
createAuctionListing(int $assetId, int $reservedPrice, int $durationDays) |
List item for sale as Auction | int, int, int |
array |
getUserListings(int $steam64Id, int $limit) |
Get user's stall/listings | int, int |
array |
deleteListing(int $listingId) |
Remove a listing | int |
array |
setListingPrivate(int $listingId, bool $status) |
Hide/unhide a listing | int, bool |
array |
setListingDescription(int $listingId, string $description) |
Update listing description (max 32 chars) | int, string |
array |
setListingPrice(int $listingId, int $price) |
Update listing price | int, int |
array |
setAwayMode(bool $status) |
Enable/disable away mode | bool |
array |
setStallPublic(bool $status) |
Enable/disable stall privacy mode | bool |
array |
getListings(int $limit, ...) |
Search global listings | See below | array |
getSimilarListings(int $listingId) |
Get similar listings | int |
array |
getListingBuyOrders(int $limit, int $listingId) |
Get buy orders for a listing | int, int |
array |
getItemLatestSales(string $itemFullName, int $paintIndex) |
Get latest sales for an item | string, int |
array |
getItemSalesGraph(string $itemFullName, int $paintIndex) |
Get sales graph for an item | string, int |
array |
getListings() Parameters:
| Parameter | Type | Description |
|---|---|---|
$limit |
int |
Number of results (required) |
$paintSeed |
?int |
Paint seed filter |
$category |
?int |
Category filter |
$rarity |
?int |
Rarity filter |
$sortBy |
?string |
Sort field |
$minFloat |
?float |
Minimum float value |
$maxFloat |
?float |
Maximum float value |
$collection |
?string |
Collection name |
$minPrice |
?int |
Minimum price (in cents) |
$maxPrice |
?int |
Maximum price (in cents) |
$type |
?string |
Item type |
$defIndex |
?int |
Definition index |
$paintIndex |
?int |
Paint index |
$minRefQty |
?int |
Minimum ref quantity |
$maxRefQty |
?int |
Maximum ref quantity |
$stickerOptions |
?string |
Sticker options |
$stickers |
?array |
Array of stickers |
$keychains |
?array |
Array of keychains |
3. CsFloatTradesApiService
Extended service for managing trades.
Methods:
| Method | Description | Parameters | Returns |
|---|---|---|---|
getVerifiedSellerTrades(int $page, int $limit = 30) |
Get verified seller trades | int, int |
array |
getPendingBuyerTrades(int $page, int $limit = 30) |
Get pending buyer trades | int, int |
array |
getTrades(string $role, array $states, int $page, int $limit) |
Get trades with custom filters | string, array, int, int |
array |
bulkAcceptTrades(array $tradeIds) |
Accept multiple trades at once | array |
array |
getTrades() Parameters:
| Parameter | Type | Description |
|---|---|---|
$role |
string |
'buyer' or 'seller' |
$states |
array |
Array of states: 'failed', 'cancelled', 'verified', 'pending' |
$page |
int |
Page number |
$limit |
int |
Results per page |
Custom Requests
You can create your own custom requests by extending AbstractRequest:
Then use it with any service:
Available Request Classes
The bundle includes the following request classes that you can use directly or extend:
User Requests
CsFloatPhpBundle\Request\User\GetMeRequest- Get authenticated user infoCsFloatPhpBundle\Request\User\PatchUserRequest- Update user settings (away mode, stall public)CsFloatPhpBundle\Request\User\GetUserStallRequest- Get user's stall/listings
Inventory Requests
CsFloatPhpBundle\Request\Inventory\GetInventoryRequest- Get user's inventory
Listings Requests
CsFloatPhpBundle\Request\Listings\GetListingsRequest- Search global listingsCsFloatPhpBundle\Request\Listings\GetSimilarListingsRequest- Get similar listingsCsFloatPhpBundle\Request\Listings\PostUserListingRequest- Create listing (buy now or auction)CsFloatPhpBundle\Request\Listings\PatchUserListingRequest- Update listing (price, description, private)CsFloatPhpBundle\Request\Listings\DeleteUserListingRequest- Delete listing
Items Requests
CsFloatPhpBundle\Request\Items\GetItemLatestSalesRequest- Get latest sales for itemCsFloatPhpBundle\Request\Items\GetItemSalesGraphRequest- Get sales graph for item
Orders Requests
CsFloatPhpBundle\Request\Orders\GetBuyOrdersRequest- Get buy orders for listing
Trades Requests
CsFloatPhpBundle\Request\Trades\GetTradesRequest- Get tradesCsFloatPhpBundle\Request\Trades\BulkAcceptTradesRequest- Accept multiple trades
Examples
Get User Inventory
Search Listings
Create Buy Now Listing
Accept Trades
Get Item Sales History
License
MIT