C5GAME OPEN
    C5GAME OPEN
    • Access Guide
    • Account
      • Account Balance
        GET
      • User Reala Steam List
        GET
    • Sell
      • Sell List
        GET
      • Modify Product Price
        POST
      • Off Sell
        POST
      • Sell Steam Items
        POST
      • Price Query
        POST
    • Order
      • Buyer Order Detail
        GET
      • Buyer Orders
        POST
      • Seller Orders
        POST
    • Buy
      • Quick Buy
        POST
      • Normal Buy
        POST
    • Market
      • Query Item Sell
        POST
    • inventory

    Access Guide

    Update Notes#

    20230927#

    First Version

    Prerequisites#

    Partners need to prepare the following information:
    Register a C5GAME account: You need to log in to the C5GAME official website or download the C5GAME APP to register an account. If the purchasing function is iterated later, you need to pre-recharge the account balance to complete the purchase of ornaments. You need to query the balance through the interface and recharge to ensure sufficient account balance, so as not to affect the use.
    App-key: All interfaces require you to fill in your app-key in the query parameter. The app-key can be applied for at C5GAME API Management . Example usage: http://openapi.c5game.com?app-key=appkey-example

    Request Structure#

    When calling the interface of the open platform, it means sending a request to our service address. You need to construct the request according to the interface address, request method, and request parameters, otherwise, the call will not succeed. A request example to query the balance is as follows:

    Service Address#

    The existing service access address of C5GAME Open Platform is as follows:
    Service RegionDomainRemark
    Domestic and foreignhttps://openapi.c5game.comOpen Platform OpenAPI Access Address

    Communication Protocol#

    All provided interfaces communicate via HTTPS, providing a high-security communication channel.

    Request Method#

    Choose GET or POST methods to initiate requests according to the specific requirements of each interface.

    Request Parameters#

    When initiating a request, the request body may contain two types of parameters: common request parameters and interface-specific business parameters.
    Common request parameters are included in every interface, currently, the query parameter is the app-key.
    Interface-specific business parameters are unique to each interface, refer to each interface's parameter description.

    Character Encoding#

    Request and return results use the UTF-8 character set for encoding.

    Signature Mechanism#

    None at present

    Return Results#

    API requests return the following results:
    Call successful:
    {
      "success": true,
      "data": {
        "userId": 111,
        "balance": 100.21
      },
      "errorCode": 0,
      "errorMsg": "",
      "errorData": {},
      "errorCodeStr": ""
    }
    Call failed:
    {
      "errorCode": 400001,
      "errorMsg": "Please enter the correct app-Key",
      "success": false
    }
    FieldTypeAlways ReturnedDescription
    successBooleanYesWhether the request was successful; true represents that the server-side process has completed without exceptions; if false, you need to look at the errorCode field error code and handle it accordingly
    errorCodeInt32YesError code, when success is true, errorCode must be 0; when success is false, errorCode must not be 0
    errorMsgStringYesError message, when success is true, errorMsg is an empty string; when success is false, errorMsg is an error description
    errorDataObjectNoReturn data when an error occurs, this structure type is not fixed, each interface returns different types
    errorCodeStrStringNoBrief English description of the error, only when success is false, may a non-empty string be returned
    dataObjectNoBusiness data returned when the request is successful, the structure varies according to each interface

    Glossary#

    NameExplanation
    Service DomainThe domain name of our service, the production environment is http://openapi.c5game.com
    app-keyThe key used by us for authentication, representing your credentials on our platform, please keep it safe. If leaked, others can also use this key to perform critical operations.

    How to Debug#

    How to use the debugging function provided by the interface documentation:
    1.
    Choose any interface, click the Debug button
    image.png
    2.
    The first time you debug, you will be guided to set environment variables. Currently, you need to set the environment variable for the app-key. Please refer to the Prerequisites section for the method of obtaining it.
    image.png
    3.
    Fill in your app-key
    image.png
    4.
    After setting, click send to get the response parameters
    image.png
    Modified at 2023-09-29 06:32:00
    Next
    Account Balance
    Built with