Giter VIP home page Giter VIP logo

contextdata's Introduction

ContextData

Context data object specifications, schemas, and examples:

  • Extending APIs from one App to another is powerful...
  • However, it requires building to a specific API ahead of time
  • Standard context and intent definitions let us create workflows on the fly

FDC3 Context Data defines a standard way to pass common identifiers and data between apps to create a seamless workflow. FDC3 Context Data is not a symbology solution and is not specifically focused on modeling financial objects. The focus is on providing a standard payload structure that can be used to establish a lowest common denominator for interoperability.

Context objects are used when declaring and raising intents, and when broadcasting context to other applications.

Context Object

Context can be summarised as:

  • Having a unique $type identifier, used for routing.
  • Optionally providing a name.
  • Optionally providing a map of equivalent identifiers.
  • Any other properties or metadata.
interface Context {
    $type: string;
    name?: string;
    id?: {
        [x:string]: string;
    },
    [x: string]: any;
}

Example Context Object

An instrument could for example be derived as (note that the name is required and the type is fixed):

interface Instrument extends Context {
    $type: 'fdc3.instrument',
    name: string;
    id: {
        ticker?: string;
        ISIN?: string;
        CUSIP?: string;
    }
}

E.g. as a JSON payload:

{
    "$type" : "fdc3.instrument",
    "name" : "Apple",
    "id" : 
    {  
        "ticker" : "aapl",
        "ISIN" : "US0378331005",
        "CUSIP" : "037833100"
    },
    "country": "US"
}

It is important to note that the context data specification allows extra identifiers and properties to be added as needed for each interop use case. In the example above, "country" could represent extra metadata in addition to the agreed instrument representation.

contextdata's People

Contributors

espenove avatar rikoe avatar

Watchers

James Cloos avatar Johan Sandersson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.