Market solver API

This is the api for the market solver.
More information: https://helloreverb.com
Contact Info: hello@helloreverb.com
Version: 1.0.1
All rights reserved
http://apache.org/licenses/LICENSE-2.0.html

Access

Methods

[ Jump to Models ]

Table of Contents

Default

Default

Up
post /solve/{rule}
determines the winning bids and payments (solveRulePost)

Path parameters

rule (required)
Path Parameter

Pricing rule:

  • Lindsay2018 - Shapley value based pricing as described by Lindsay (2018).
  • VCG - Vickrey-Clarke-Groves pricing.
  • PaB - Pay-as-bid pricing.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body Problem (required)
Body Parameter — Problem to solve

Return type

Solution

Example data

Content-Type: application/json
{
  "surplus_shares" : {
    "seller" : 10,
    "buyer h" : 30
  },
  "problem" : {
    "bidders" : [ {
      "name" : "airline",
      "bids" : [ {
        "v" : 0,
        "q" : {
          "a" : 1
        }
      }, {
        "v" : 0,
        "q" : {
          "b" : 1
        }
      } ]
    }, {
      "name" : "tourist",
      "bids" : [ {
        "v" : 90,
        "q" : {
          "a" : -1,
          "b" : -1
        }
      } ]
    }, {
      "name" : "co-authors",
      "bids" : [ {
        "v" : 60,
        "q" : {
          "a" : -1
        },
        "xor_group" : 1
      }, {
        "v" : 60,
        "q" : {
          "b" : -1
        },
        "xor_group" : 1
      } ]
    } ]
  },
  "surplus" : 20,
  "payments" : {
    "key" : 0.8008281904610115
  },
  "rule" : "Lindsay2018"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

solution with winning bids and surplus shares. Solution

400

invalid input, object invalid

Models

[ Jump to Methods ]

Table of Contents

  1. Bid
  2. Bidder
  3. Problem
  4. Solution

Bid Up

v
BigDecimal The amount of money bid. Positive values indicate paying money (buying) and negative values indicate receiving money (selling).
q
map[String, BigDecimal] A map specifying the items offered and/or demanded. The map keys are the name of the good. The map values are the quantities. Positive values indicate giving (selling) and negative values indicate taking (buying).
example: {"a":1,"b":1}
xor_group (optional)
String Used for XOR bids. Only one bid in each XOR group can be winning.
divisible (optional)
Boolean whether the bid can partially transact.
divisibility (optional)
BigDecimal <p>divisibility:</p>

divisibility:

  • 0 - indivisible - only complete bid transacts
  • 1 - divisible - bid can partially transact.
  • 2 - mixed - for use with XOR bids, within the XOR group, bids can partially transact but the sum within the XOR group of the factions that transact must equal 0 or 1.
Enum:
0
1
2
label (optional)
String Optional property used to aid interpreting the problem.
winning (optional)
BigDecimal Used after the market has been solved to indicate if the bid is winning. If the property is present, then the bid is winning.

Bidder Up

id
bids
array[Bid] An array of bids.

Problem Up

bidders
description (optional)
free_disposal (optional)

Solution Up

rule
example: Lindsay2018
surplus_shares
example: {"seller":10,"buyer h":30}
payments
surplus
example: 20
problem